Or use pure CF...select top 1 from a table and just get the column names from the query.
Using sysobjects is a sure fire way of getting the correct values but probably not the wisest of choices for newbies ;-p -----Original Message----- From: Bob Imperial [mailto:[EMAIL PROTECTED] Sent: 24 August 2006 04:04 To: CF-Newbie Subject: RE: OT sql question Excellent ... That's what I was after ;-) thanks a bunch Mike!! -----Original Message----- From: Mike Chytracek [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 23, 2006 10:15 PM To: CF-Newbie Subject: RE: OT sql question Sorry. You can just do: SELECT A.name FROM dbo.syscolumns A INNER JOIN dbo.sysobjects B ON A.id = B.id WHERE (B.name = 'TableName') If you aren't interested in EVERYTHING SQL stores about your table. -----Original Message----- From: Bob Imperial [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 23, 2006 8:51 PM To: CF-Newbie Subject: OT sql question Can someone enlighten me on how to retrieve all the column names from a MSSQL table please? TIA Old Dog still trying to learn new tricks ;) Bob ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:1982 Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
