This is good if say you have like 100 columns or more and you need to reference each one in your code. Just run this select and copy and paste the column names into your code...
SELECT column_name FROM INFORMATION_SCHEMA.Columns
where TABLE_NAME = 'mytable'
Just replace mytable with the actual table name.
And if you want to take that shit to another level, then do this...
SELECT 'Dim ' + column_name + ' As Object' FROM INFORMATION_SCHEMA.Columns
where TABLE_NAME = 'myTable'
Monday, August 11, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment