I'm not sure if there is a way to return the column names from a query
result set in the query order. However, if you just want to get ALL the
column names from the table in the correct order, you could use this query.
This works for SQL Server where TABLENAME is the name of the table that you
want the column information. I'm not certain about any other servers.
SELECT name
FROM syscolumns
WHERE (id =(SELECT id
FROM sysobjects
WHERE name = 'TABLENAME'))
ORDER BY colorder
-
Nate Smith,
Lead Developer
Macromedia Coldfusion 5 Certified Professional
Macromedia Certified Web Site Developer
[EMAIL PROTECTED]
www.doceus.com
> -----Original Message-----
> From: saro cf [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, October 04, 2001 6:43 PM
> To: CF-Talk
> Subject: columnlist
>
>
> How to preserve the ordering of columnlist returned by cfquery.
> By default it is ordering by alphabetical.
> I need the same column order specified in table.
>
> -Saro
>
>
>
> --
> saro cf
> [EMAIL PROTECTED] - email
> (818) 630-2340 x6093 - voicemail/fax
>
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists