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.
Author |
Topic |
hasanali00
Posting Yak Master
207 Posts |
Posted - 2006-05-17 : 08:50:48
|
I am told to print all the Fields of my tables in alphabetical order.Can this be achieved? Can I export all the table fields into Word document?regards |
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2006-05-17 : 08:53:52
|
select name from syscolumns where id = object_id('mytable') order by name==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
|
|
hasanali00
Posting Yak Master
207 Posts |
Posted - 2006-05-17 : 10:02:10
|
Thanks.Would I have to run this command for each table, or is there any easier way to return ALL the fields of ALL the tables in one go?regards |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-05-18 : 03:04:06
|
Select table_name, Column_name from Information_Schema.ColumnsOrder by table_name, Column_nameMadhivananFailing to plan is Planning to fail |
|
|
hasanali00
Posting Yak Master
207 Posts |
Posted - 2006-05-18 : 04:40:20
|
beautiful |
|
|
|
|
|