THANK YOU!!!  I've been googling this for hours it seems.  Works perfect.
Anyone know of a solution for access?

Emmet

-----Original Message-----
From: Michael T. Tangorre [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 05, 2005 2:07 PM
To: CF-Talk
Subject: RE: Query.ColumnList Sorting?

This will get you the columns from a table in the order in which they are
defined in the DB (SQL SERVER).

Replace customers with the table for which you want the columns from.

SELECT
        column_name
FROM
        information_schema.columns
WHERE
        table_name = 'Customers'
ORDER BY
        ordinal_position

HTH,

Mike






~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220156
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to