How could I substibute dbo.properties properties from sql server 2000 to sql server 2005?

  • Hello:

      I use below sql statements to get certain table's field type:

    use ezplan

    SELECT A.colid,

           A.name as COLUMN_NAME,

           C.name as DATA_TYPE,

           A.length as DATA_LENGTH,

           B.value as COLUMN_DESCRIPTION

     FROM dbo.syscolumns A

      left join dbo.sysproperties B on A.id = b.id and A.colid = B.smallid and B.name='MS_Description'

      left join dbo.systypes C on A.xtype = C.xtype

     WHERE A.id = (select id

                     from dbo.sysobjects

                    where name = 'SpecDetail' and type = 'U')

                  and A.name='DefaultStr' 

     ORDER BY A.colid

    but when I try to upgrade to SQL server 2005, the 'dbo.sysproperties' does not exists any more !

    How could I substitute dbo.sysproperties for alternative statement?

    Please help me !

    Any suggestion would be appreciated.

    Regards

    Carl

  • Carl,

    I can't check it now (no SQL2005 server at hand), but most system tables/views in 2005 are in the sys schema and you have to call them like sys.properties.

    Markus

    [font="Verdana"]Markus Bohse[/font]

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply