Getting an error, any ideas

Here is the top 2 items

client_first_name
co_client_first_name

      Error Diagnostic Information
      ODBC Error Code = 37000 (Syntax error or access violation)


      [Microsoft][ODBC SQL Server Driver][SQL Server]Line 4: Incorrect syntax
near 'co_client_first_name'.






Douglas Brown
Email: [EMAIL PROTECTED]
----- Original Message -----
From: "S. Isaac Dealey" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, July 03, 2002 3:49 PM
Subject: Re: 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
>
> How the heck would you know what data type to assign to 200 of these?
>
> It'd be dead simple to construct a query to do this in CF tho ...
>
> <cffile action="read" file="#myfile#" variable="myvariable">
>
> <cfquery name="maketable" datasource="...">
> CREATE TABLE mynewtable (
> <cfloop index="x" from="1"
> to="#listlen(myvariable,CHR(13))#">
> #listgetat(myvariable,x,CHR(13))# varchar(8000)
> <cfif x gt 1>,</cfif></cfloop> )
> </cfquery>
>
> hth
>
> Isaac
>
> www.turnkey.to
> 954-776-0046
>
> 
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.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