Or
Queryname.Columnlist
Jerry Staple
Web Application Developer
Head Office
133-137 Lisburn Road, Belfast
Northern Ireland BT9 7AG
T +44 (0) 28 9022 3224
F +44 (0) 28 9022 3223
E [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
W biznet-solutions.com <http://www.biznet-solutions.com/>
-----Original Message-----
From: Nate Smith [mailto:[EMAIL PROTECTED]]
Sent: 05 October 2001 15:45
To: CF-Talk
Subject: RE: columnlist
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
>
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
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