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
 SQL Server Development (2000)
 Getting Column Names

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-04-11 : 00:03:14
Pete writes "Hi,

I'm having a little difficulty in finding/writing a method to just get the column names of a particular combined view. I am at present selecting the records from the view so that I can loop through the column names returned to populate labels on an interface. Unfortunately, the view takes far too long to return and I have looked at the Describe function but my SQL is not really up to that level (as described in the SQLServer books online.)

Any pointers on getting the column names, or making my SQL a little slicker would be appreciated, currently my select just executes where a I know a parameter does not exist, ie Where Gender = 'x' instead of M or F, thus returning no records but is a bit quicker.

Thanks

Pete"
   

- Advertisement -