Wed 31 Jan 2007
Extracting Metadata From SQL Server
Posted by Shane under Other
select upper(b.name) as table_name, upper(a.name) as column_name,
a.colid, a.length, a.xprec, a.xscale, a.xtype,(CASE WHEN a.xtype=167 then 'varchar'
WHEN a.xtype=175 then 'char'
WHEN a.xtype=61 then 'datetime'
WHEN a.xtype=106 then 'decimal'
END) as col_type
from syscolumns a,
sysobjects b
where a.id=b.id
and b.xtype='U'
and upper(b.name) <> ‘DTPROPERTIES’
order by b.name, a.name, a.colid
February 7th, 2007 at 3:59 pm
Hey Shane, finally catching up. Heard you’ve had a couple of shifts in the past couple of months. Contact me soon?