Re: SQL 6.5 to SQL 2000 Convert function
From: Erland Sommarskog (sommar_at_algonet.se)
Date: 05/23/04
- Next message: Erland Sommarskog: "Re: .net connecting to Pubs database"
- Previous message: Erland Sommarskog: "Re: Execute without reporting errors"
- In reply to: Munnu: "SQL 6.5 to SQL 2000 Convert function"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 23 May 2004 22:37:45 +0000 (UTC)
Munnu (anonymous@discussions.microsoft.com) writes:
><B>But Can pass anyother parameter or change setting that allow me to
>execute
> SELECT CONVERT(INT(2),COUNT(*))
> FROM tablename
> WHERE condition
> stmt in SQL 2000 without changing code? </B>
No.
SQL Server offers the possibility to set a database in compatibility
mode, so that old syntax still works. However, your particular example
is not covered by the compatibility 65. (I just tried.) I have never
seen int(2) before, and I don't think this was ever documented or
supported in SQL6.5, it just happened to work.
To change the compatibility level of a database, you use sp_dbcmptlevel,
look in Books Online for details. However, I recommend that you fix
all syntax errors, so that you can use compatibility level 80 and use
SQL2000 at full strength.
-- Erland Sommarskog, SQL Server MVP, sommar@algonet.se Books Online for SQL Server SP3 at http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
- Next message: Erland Sommarskog: "Re: .net connecting to Pubs database"
- Previous message: Erland Sommarskog: "Re: Execute without reporting errors"
- In reply to: Munnu: "SQL 6.5 to SQL 2000 Convert function"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|