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
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 he
<[EMAIL PROTECTED]>
> > To: "CF-Talk"
> > 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 head
er too.
>
> -Original Message-
> From: "Steve Sequenzia" <[EMAIL PROTECTED]>
> To: "CF-Talk"
> 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
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 wit
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
http://ostermille
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
so as to put something (even just a space) in there.
~~~
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"
Sent: 8/24/07 2:32 PM
Subject: Importing CSV into
I am trying to write some code that takes a .cs
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 po
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
: http://www.grida.no
-
| -Original Message-
| From: CFUG Spain [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 into Database - Update
It looks like you have an incorrect (maybe empty) line you try to
import. Check for ListLen() of your line and if it isn't 21 you have a
problem. Maybe you can ignore the import then and write an error
message.
As you use chr(13) as a dilimit
ilto:[EMAIL 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:
>
> *** *** ***
>
rting CSV into Database
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 dir
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, 21
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
*** *
16 matches
Mail list logo