Home > Archive > MS SQL Server > July 2005 > csv questions









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author csv questions
Manny Borges

2005-07-28, 9:23 am

I have two questions.

If I upload a csv with a new value for an existing record will it update the
record, will it error out, or will it create havoc?
I have seen how manually entering a duplicate record can cause issues.

Related to this, i am using Excel as a tool to drop data in to then generate
the CSV.

I did a sample create and upload to a new table, and found that the CSV file
had truncated the text in the individual fields. I am using the database as a
holder for a multilanguage service, so it really is just text being stored.
But since the csv is cutting the text, the translation fields are all
incomplete.

Is this a CSV limit or an Excel 2003 limit.
Daniel Crichton

2005-07-28, 9:23 am

Manny wrote on Thu, 28 Jul 2005 06:08:02 -0700:

> I have two questions.
>
> If I upload a csv with a new value for an existing record will it update
> the record, will it error out, or will it create havoc?
> I have seen how manually entering a duplicate record can cause issues.


It depends on how you do the update. You could upload to an empty table,
then run an UPDATE query to modify existing rows by joining on the key(s),
and then an APPEND to add new rows to the table.

> Related to this, i am using Excel as a tool to drop data in to then
> generate the CSV.
>
> I did a sample create and upload to a new table, and found that the CSV
> file had truncated the text in the individual fields. I am using the
> database as a holder for a multilanguage service, so it really is just
> text being stored. But since the csv is cutting the text, the translation
> fields are all incomplete.
>
> Is this a CSV limit or an Excel 2003 limit.


IIRC Excel truncates data in cells when saving as CSV. CSV itself has no
limit other than the number of characters that can be on a single line,
which is dependent upon on how the data is read.

Dan


Manny Borges

2005-07-28, 1:25 pm



"Daniel Crichton" wrote:

> Manny wrote on Thu, 28 Jul 2005 06:08:02 -0700:
>
>
> It depends on how you do the update. You could upload to an empty table,
> then run an UPDATE query to modify existing rows by joining on the key(s),
> and then an APPEND to add new rows to the table.
>


I am using the potatohead wizard.

I see that it can take an excel file as an import so I may try that.

I have the database on a virtual server now so I can play with it and see
what happens to the data when I move things in and out.


>
> IIRC Excel truncates data in cells when saving as CSV. CSV itself has no
> limit other than the number of characters that can be on a single line,
> which is dependent upon on how the data is read.
>
> Dan
>
>
>

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com