Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 field descriptions

Author  Topic 

mattew
Starting Member

9 Posts

Posted - 2003-01-15 : 03:30:15
I've imported a database access in sql server. The wizard doesn't import the description of the fields.
How can I write in this field with a store procedure or with a t-sql query?



rihardh
Constraint Violating Yak Guru

307 Posts

Posted - 2003-01-15 : 04:15:01
How about if you do it again manually. You'll wonder what weird things one can write...

Go to Top of Page

mattew
Starting Member

9 Posts

Posted - 2003-01-15 : 05:44:48
I have to import about 1000 description field! I need a query or a function that do it.
I have found this query that work with sys table:

SELECT PERCENT so.name, sc.name AS Expr1, sc.xtype, sc.length, sc.colid, tableprop.[value] AS TableDescription, colprop.[value] AS ColDescription,
colprop.name AS Expr2
FROM dbo.sysobjects so LEFT OUTER JOIN
dbo.syscolumns sc ON sc.id = so.id LEFT OUTER JOIN
dbo.sysproperties tableprop ON tableprop.id = so.id AND tableprop.type = 3 LEFT OUTER JOIN
dbo.sysproperties colprop ON colprop.id = sc.id AND colprop.type = 4 AND colprop.smallid = sc.colid
WHERE (so.type = 'u') AND (so.name = 'TableName')
ORDER BY sc.colid

It's very good because the query should return in the "ColDescription" field the description of the field but it doesn't work correctly because ColDescription field display "<binary>"

can you help me?


Go to Top of Page
   

- Advertisement -