Ispirer Ispirer
 


Ispirer Home Page Ispirer SQLWays Product Page - Migration to SQL Server Request SQLWays

System table – syscolumns

Compatability view should be upgraded to catalog view.

Microsoft SQL Server 2000:

 SELECTFROM syscolumns

Microsoft SQL Server 2008:

 SELECTFROM sys.COLUMNS

Column convesion:

Microsoft SQL Server 2000 (syscolumns) Microsoft SQL Server 2008 (sys.columns)
id object_id
colid CONVERT(smallint,column_id)
isnullable is_nullable
xtype system_type_id
length case when max_length = -1 then 8000 else max_length end
xprec precision
scale CONVERT(int, nullif(scale,0))
collation collation_name
cdefault default_object_id
xusertype user_type_id
name Isnull(name, '')
CollationPropertyFromId(collationid, 'sqlcharset') CollationProperty(collation_name, 'sqlcharset')

Ispirer Home Page Ispirer SQLWays Product Page - Migration to SQL Server Request SQLWays

sqlways/sql-server/upgrade/systemobjects/syscolumns.txt · Last modified: May 07, 2018, 03:15:34 PM (external edit)
 
© 1999-2019, Ispirer Systems Ltd.
All Rights Reserved.  Privacy Statement