You haven't mentioned the average size of the CSV file you're importing.  If 
it's not too big, and you run your CF scheduled task at 2 in the morning or 
thereabouts, it should be fine to just output your query and do the db 
inserts one row at a time.

If it's such a huge file that it will chew up resources for a while, you 
might have to use one of the alternate routes others have mentioned.

-- Josh




----- Original Message ----- 
From: "Crow T. Robot" <[EMAIL PROTECTED]>
To: "CF-Talk" <[email protected]>
Sent: Thursday, June 22, 2006 1:19 PM
Subject: Re: appending two queries


> Well, this script will be running on a scheduled task, but it'll be a CF
> scheduled task.  That solution might work with some modifications.
>
> Let me bring a little more background in to the equation.  The data that
> is being read in via CSV has a date attached to each record, if any of
> the dates in the database matches those dates, I need to delete any and
> all data from that day, then do the group import, if possible.  So, I
> don't see any way to do this without CF getting involved.
>
> Sorry, this is getting more complicated, but it is the problem that was
> put in front of me.  :)
>
> Andy Matthews wrote:
>> What about saving the file to the server then running a scheduled task 
>> and
>> let the database do the import. It'll be WAY faster and won't involve CF 
>> at
>> all. I recently had our sysadmin setup something like that for me. It ran 
>> in
>> 10 or 15 seconds what was taking CF about 2 or 3 minutes to perform.
>>
>> <!----------------//------
>> andy matthews
>> web developer
>> certified advanced coldfusion programmer
>> ICGLink, Inc.
>> [EMAIL PROTECTED]
>> 615.370.1530 x737
>> --------------//--------->
>>
>> -----Original Message-----
>> From: Crow T. Robot [mailto:[EMAIL PROTECTED]
>> Sent: Thursday, June 22, 2006 2:49 PM
>> To: CF-Talk
>> Subject: Re: appending two queries
>>
>>
>> This will happen once a day, every day.  Same data structure, yes, same
>> database table, yes.  Same data, no.
>>
>> Ben Nadel wrote:
>>> Is this a one-time deal? Or is this something you need to do on a 
>>> regular
>>> basis (same DB, same table).
>>>
>>> .......................
>>> Ben Nadel
>>> Web Developer
>>> Nylon Technology
>>> 350 7th Avenue
>>> Floor 10
>>> New York, NY 10001
>>> 212.691.1134 x 14
>>> 212.691.3477 fax
>>> www.nylontechnology.com
>>>
>>> "Some people call me the space cowboy. Some people call me the gangster 
>>> of
>>> love."
>>>
>>> -----Original Message-----
>>> From: Crow T. Robot [mailto:[EMAIL PROTECTED]
>>> Sent: Thursday, June 22, 2006 3:36 PM
>>> To: CF-Talk
>>> Subject: appending two queries
>>>
>>> Let's say that I have a CSV file that I am reading into a page, and I
>>> convert it to a query.  I have a database table that it set up exactly
>> like
>>> the converted query, I want to basically insert the CSV data into the
>>> database.  Is there an easier, more efficient way to do this that 
>>> looping
>>> over the CSV query and doing an insert for each record?
>>>
>>> SQL Server 2K, CFMX6.1
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:244581
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=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to