this still seems like a whole bunch of work for something that can be done
very easily in SQL Server. I could have this pkg set up in less than 20
minutes, and I bet it would be 10X faster than your CF.
the only reason I see to not use the right tool for this job is if there
were some issue with
Message-
From: Steve Sequenzia [EMAIL PROTECTED]
To: CF-Talk cf-talk@houseoffusion.com
Sent: 8/24/07 2:32 PM
Subject: Importing CSV into
I am trying to write some code that takes a .csv file and inserts it
into SQL.
I am having issues with it reading the header. I would like to be able
it from a web
page. I need to look into it some more.
Why not use dts? Put the work on the db server, not the cf server.
MUCH faster too.
-Original Message-
From: Steve Sequenzia [EMAIL PROTECTED]
To: CF-Talk cf-talk@houseoffusion.com
Sent: 8/24/07 2:32 PM
Subject: Importing
Crow,
Thanks for the info, that is very helpful.
I am using SQL 05 DTS is not really an option anymore. I had to use Integration
Services to do it. I am guessing you can save the package and call it like you
do a DTS package.
Any ideas if it will function the same way.
Thanks again for the
Unfortunately, I don't get the opportunity to use SQL 05 yet, we're still on
2K, so I'm not sure how you'd do it from there. I bet someone here can
answer tha tho. I'd personally like to know myself. Good luck!
On 8/27/07, Steve Sequenzia [EMAIL PROTECTED] wrote:
Crow,
Thanks for the info,
The trick here is CF's list functions don't register empty list spots.
If you do a ListLen on 1,2,,3 which looks like four spots - it'll
return 3.
I tend to do a Replace() on strings like that - set ,, to , , -
adding a space - and then that way, the list functions will sniff out
that
Why not use dts? Put the work on the db server, not the cf server. MUCH
faster too.
-Original Message-
From: Steve Sequenzia [EMAIL PROTECTED]
To: CF-Talk cf-talk@houseoffusion.com
Sent: 8/24/07 2:32 PM
Subject: Importing CSV into
I am trying to write some code that takes a .csv file
Oh and something I forgot - you'll need to accomodate rows like you
mentioned in your example, where what should be the first or last list
positions are empty as well. Something like
cfif left(string, 1) IS ,
cfset string = ' ' string
/cfif
so as to put something (even just a space) in
I am trying to write some code that takes a .csv file and inserts it into SQL.
I am having issues with it reading the header. I would like to be able to leave
the header on the file and not have it insert the header data into the DB.
When I try to run it without a header I am having issues with
Using the list function with CSV files can be an issue since the List
stuff in CF doesn't recognize a blank column. So Something,,, only
returns 1 element.
The other thing is that excel does weird things with CSV files also.
There is a really nice java library called Ostermiller
[mailto:[EMAIL PROTECTED]
| Sent: Friday, February 13, 2004 08:46
| To: CF-Talk
| Subject: Re: [cftalk] RE: Importing CSV into Database - Update
|
| A problem I had with importing CSV at least CSV created by
| excel is that the files it creates are not always comma
| delimited, they are sometimes
Good morning,
I am having a heck of a time with this little import script.When it runs,
all I receive are the messages that 'An error occurred while updating the
database.' (as I indicated it should do if the query fails)
Can anybody point me in the right direction?
Thanks!!
--
Jillian
***
I don't know what the data you are trying to insert is but I would make
sure of a few things. Make sure that the only commas in the file are the
delimiters. Check to make sure your not putting a string into an int
field. Also, you have a comma at the end of your SQL statement.
'#ListGetAt(l,
of
(#ListGetAt(l, 2)#), occupying document position (56:7) to (56:23).
*** *** ***
Where should I go from here? Should I be taking a different approach?
--
Jillian
-Original Message-
From: Jillian Carroll [mailto:[EMAIL PROTECTED]
Sent: February 12, 2004 10:57 AM
To: CF-Talk
Subject: Importing CSV
PROTECTED]
Sent: donderdag 12 februari 2004 19:04
To: CF-Talk
Subject: RE: Importing CSV into Database - Update
I've played with this a little more.The error I am now
getting (after removing the cftry so I could see) is this:
*** *** ***
Error Diagnostic Information
An error occurred
A problem I had with importing CSV at least CSV created by excel is that the files it creates are not always comma delimited, they are sometimes semicolon delimited.
So your code that looks for the second value in a comma delimited list would never get found as it is in fact delimited
16 matches
Mail list logo