Doug,
The below code should work for you.
Whatever your file is
<cffile action = "read" file = "F:\inetpub\wwwroot\....\column.txt" variable
= "txtColumns">
<cfset LColumns=ListChangeDelims(txtColumns,",",chr(13))>
<cfset nQuery="">
<cfloop index="x" from="1" to="#listlen(LColumns,",")#">
<cfset nQuery=ListAppend(nQuery,listgetat(LColumns,x,",")& " "&
"varchar(300)",",")>
</cfloop>
<cfquery name="QName" datasource="">
Create Table newTable (#nQuery#)
</cfquery>
Hope the above is what you wanted.
Joe
-----Original Message-----
From: Douglas Brown [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 03, 2002 6:42 PM
To: CF-Talk
Subject: DTS Import
I have a text file with about 200 lines in it, and I want the value of
each line to be a column in the database. How do I go about this? I
tried first row has colum name, but it just gives me the first row as a
column name and the other 299 rows as values.
Example:
I want all these to be column names
client_first_name
co_client_first_name
client_last_name
co_client_last_name
client_middle_initial
co_client_middle_initial
client_email
co_client_email
client_home_phone
Douglas Brown
Email: [EMAIL PROTECTED]
______________________________________________________________________
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