Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit 0c3d501

Browse files
Merge pull request #14477 from nahk-ivanov/alexiva/add-s2ss0092
Add documentation for S2SS0092 conversion message
2 parents 23466d7 + 476315d commit 0c3d501

3 files changed

Lines changed: 50 additions & 1 deletion

File tree

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
title: "S2SS0092: The conversion for provided date format is not supported (Error)"
3+
description: "Describes why SQL Server Migration Assistant (SSMA) for Sybase does not convert a call to CONVERT function with specified style argument."
4+
authors: "nahk-ivanov"
5+
6+
ms.service: "ssma"
7+
ms.devlang: "sql"
8+
ms.topic: "article"
9+
ms.date: "4/10/2020"
10+
ms.author: "alexiva"
11+
---
12+
13+
# S2SS0092: The conversion for provided date format is not supported (Error)
14+
15+
This article describes why SQL Server Migration Assistant (SSMA) for Sybase does not convert a call to CONVERT function with specified style argument
16+
17+
## Background
18+
19+
Whenever there is a call to the `CONVERT` function to or from date/time data types SSMA will try to translate it appropriately. Sybase/SAP ASE and SQL Server support different date and time formats, thus there might be values of `format-style` (third) argument that do not have direct mapping in SQL Server. SSMA tries to emulate some of these styles by using explicit `FORMAT` function call, but there still might be format styles that SSMA cannot convert.
20+
21+
## Example
22+
23+
Consider the example below, in which we are trying to format date value using style `30`:
24+
25+
```sql
26+
SELECT
27+
CONVERT(VARCHAR(20), [StartDate], 30) AS [StartDate]
28+
FROM
29+
[Employees]
30+
```
31+
32+
When you try to convert the above code in SSMA, it generates the following error message:
33+
34+
> S2SS0092: The conversion for provided date format is not supported
35+
36+
## Possible remedies
37+
38+
To resolve this error, you can use `FORMAT` function with the desired format:
39+
40+
```sql
41+
SELECT
42+
FORMAT([StartDate], 'dd \d MM \m yyyy \y') AS [StartDate]
43+
FROM
44+
[Employees]
45+
```

docs/ssma/sybase/messages/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- name: S2SS0092
2+
href: s2ss0092.md

docs/ssma/sybase/toc.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,4 +136,6 @@
136136
- name: Logging
137137
href: global-settings-logging-sybasetosql.md
138138
- name: Tester
139-
href: global-settings-tester-sybasetosql.md
139+
href: global-settings-tester-sybasetosql.md
140+
- name: Conversion messages
141+
href: messages/toc.yml

0 commit comments

Comments
 (0)