Sorry, I've been out a couple of days, but you could just write it to a 
file and then use cfexecute to load the sql file.

mysql -u root < "C:\sqlFiles\fileName.sql"

--Ferg

[EMAIL PROTECTED] wrote:
> I neglected to mention that I'm using mySQL. 
>
> I don't know if cfftp is an option as the only method I've seen of downloading
> the file is via an HTTP get request. It appears that CF (with mySQL) can
> perform multiple INSERT statements within one CFQUERY block, but I don't know
> HOW many.
>
> I've been thinking about this since I posted and I suppose that I could go 
> about
> it like this:
>
> 1) CFHTTP the file into a variable.
> 2) Split the variable on the ; into a few hundred distinct blocks.
> 3) Loop over each of those blocks and perform that group of INSERT statements.
> 4) Lather, rinse, repeat.
>
>   
>> Thanks Jim.. I stand corrected. I thought he was just exporting the data
>> into the file. 
>>
>> Phil
>>
>>  
>>
>> -----Original Message-----
>> From: Jim Wright [mailto:[EMAIL PROTECTED] 
>> Sent: Sunday, May 28, 2006 2:16 PM
>> To: CF-Talk
>> Subject: Re: Reading an SQL file via HTTP request and importing it.
>>
>> On 5/28/06, Phillip Holmes <[EMAIL PROTECTED]> wrote:
>>     
>>> I would use cfftp to read the file and then use SQL's BCP.exe to 
>>> import it into SQL.
>>>       
>> BCP wouldn't work with this file, as it is just a batch of sql statements,
>> not some kind of structured data file.  The osql.exe utility could be used
>> to run the batch if you are using SQL Server.
>>
>> --
>> Jim Wright
>> Wright Business Solutions
>> [EMAIL PROTECTED]
>> 919-417-2257
>>
>>
>>
>>
>>     
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241738
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