Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 2 Problems:(i)BCP with CSV (ii)Comapre table data

Author  Topic 

gsgill76
Posting Yak Master

137 Posts

Posted - 2006-10-13 : 03:33:25
Hi i have TWO problems (using SQL Server-2005)
1)
When exporting the CSV values (generated by BCP), it fails. What i find:
An example
The field in the table (add2) contains comma itself, I mean the data itself having comma (,).
Example:
Add1 Add2 Add3
abc xyz,ccc (null)

CSV output:
abc,xyz,ccc,

When I import it become (may be something like this)
Add1 Add2 Add3
abc xyz ccc

& fails.
I too use tab separated value (for Export/Import), but alas tab is also a part of data itself.
I don’t want to user format file, with BCP (as I am taking backup of database, this will create a number of new files .fmt & space too)

2)
How can I compare two tables’ data (each row by row) in two different databases? (I just want to check whether my data is successfully Exported or not? Not just compare the number rows; the data itself need to check, probably using SSMS)

Regards,
Thanks.
Gurpreet S. Gill

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2006-10-13 : 04:34:09
quote:
How can I compare two tables’ data (each row by row) in two different databases?


You will have to use third party tool like Reg-Gate's SQL Compare.

Harsh Athalye
India.
"Nothing is Impossible"
Go to Top of Page

gsgill76
Posting Yak Master

137 Posts

Posted - 2006-10-13 : 04:42:01
any other freeware?
what about my first problem, i too try pipe (|), but it throws error as

C:\>bcp PMSTEMP..SCRIPS out "RIPS.txt" -c -SVSNET1 -U sa -P sa!234 -t|

The syntax of the command is incorrect.

why? any idea to have pipe separated value?
Regards,
Thanks.
Gurpeet S. Gill
Go to Top of Page
   

- Advertisement -