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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Old Forums
 CLOSED - SQL Server 2005/Yukon
 SELECT * not allowed in Yukon?
 Forum Locked
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

spirit1
Cybernetic Yak Master

Slovenia
11752 Posts

Posted - 09/21/2004 :  14:08:15  Show Profile  Visit spirit1's Homepage
to get a list of column names in table with many columns i use
Declare @ColumnList varchar(1000)
SELECT @ColumnList = COALESCE(@ColumnList + ', ', '') + column_name
FROM INFORMATION_SCHEMA.Columns
WHERE table_name = 'TableName'
Select @ColumnList

works for me....

Go with the flow & have fun! Else fight the flow
Go to Top of Page

Kristen
Test

United Kingdom
22859 Posts

Posted - 09/22/2004 :  13:27:46  Show Profile
And now along come the darn style police ...

... I would put an ORDER BY in there so that the results are "repeatable"

Kristen
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 09/26/2006 :  13:57:18  Show Profile
quote:
Originally posted by Kristen

... I would put an ORDER BY in there so that the results are "repeatable"



ORDER BY ORDINAL_POSITION



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam
Go to Top of Page

Kristen
Test

United Kingdom
22859 Posts

Posted - 09/26/2006 :  14:25:46  Show Profile

Invalid column name 'ORDINAL_POSITION'.


Edited by - Kristen on 09/26/2006 14:26:05
Go to Top of Page

Vijaykumar_Patil
Posting Yak Master

India
121 Posts

Posted - 01/19/2007 :  14:18:32  Show Profile  Visit Vijaykumar_Patil's Homepage  Click to see Vijaykumar_Patil's MSN Messenger address
Saddly SELECT * is not removed from the SPROCs nor from Querying

Necessity is the mother of all inventions!
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
38200 Posts

Posted - 01/19/2007 :  14:34:28  Show Profile  Visit tkizer's Homepage
quote:
Originally posted by Vijaykumar_Patil

Saddly SELECT * is not removed from the SPROCs nor from Querying




Yeah we figured that out 3 years ago! Check the date on this thread.

Tara Kizer
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous Page
 Forum Locked
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.12 seconds. Powered By: Snitz Forums 2000