Here's a standard routine I use for listing tables and columns. More info
can be found by looking up "information schema views" in SQL books Online.

<cfquery name=get datasource=#dsn#>
select * from information_schema.columns
order by table_name, column_name
</cfquery>

<cfoutput query=get group=table_name>
#table_name#<br>
<cfoutput>
#column_name# #data_type# #character_maximum_length#<br>
</cfoutput>
</cfoutput>

HTH
D



************************
Diana Nichols
Webmistress
http://www.lavenderthreads.com
770.434.7374


-----Original Message-----
From: Jamie Jackson [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 27, 2002 11:20 AM
To: CF-Talk
Subject: Getting field names, etc. from MSSQL 2000


Is it possible to get information about a table via SQL (or some other
method)? I would like to get field names, datatypes/lengths, etc.

I am using MSSQL 2000.

Thanks,
Jamie

______________________________________________________________________
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

Reply via email to