Vorheriges Thema

Nächstes Thema

Inhaltsverzeichnis

Buchindex

Appendix C: Functional Errors To Be Solved

This section covers only the most common problems. In principle, any difference as described in Isah ASE2MSSQL Transact SQL differences.doc@hyperlink? can result in a difference in behavior. Many differences are already recognized by the SSMA tool, however, and the code is automatically corrected accordingly.

1. Different behavior of bits in joins and select

2. Problems with DECLARE – OPEN CURSOR and CLOSE – DEALLOCATE CURSOR

3. Error in SSMA coding of @@FETCH_STATUS

4. Implicit translation from string to date

5. Check code for 'CROSS JOIN' and compare with the old code

6. Do not use this construct

7. @@ProcID in triggers

8. @@RowCount in triggers

9. When you apply the SubString function and retrieve a non-existing section of a string, Sybase will return NULL, and MSSQL will return the empty string. Sometimes the SSMA tool marks such constructs, but when the construct is not complex enough, it will not be marked. See Appendix B, item 2 for an example.

10. When a Char(x) field gets x+n characters in Sybase, n characters will be trimmed. MS SQL Server will return an error message. When truncation is intended, use an additional CAST statement. If a temporary table or local variable is used containing a Char field that is too short, change the length of the field or the variable.

11. Convert(Numeric(5,2), <expression>) performs a Truncate operation in Sybase when there are more than two decimals. In MS SQL Server a Round operation is performed. Generally, the behavior displayed by MS SQL Server is the desired behavior.