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)
 ASCII File with European separators import with BCP

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-09-11 : 07:37:57
Joe writes "I receive ascii files with numbers and dates.
Numbers have a comma as decimal sign; Dates have a dot as separator... something like this:
123,45|123,45|12.12.2003|
Destination table is
Table A
(
col_01 Numeric(5,2),
col_02 Numeric(5,2),
col_03 DateTime
)
I want to import these files using the BCP tool.
The problem is that bcp doesn't have any parameter to configure decimal signs and date separators.
Do you have any solution to this.
Thanks and Regards
Joe"

nr
SQLTeam MVY

12543 Posts

Posted - 2003-09-11 : 10:53:04
Import into a character field.
I always import into a staging table (chanracter field or fields) then transfer to the active table and do any transformations on the way.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2003-09-11 : 20:01:15
I don't think it will help, but maybe the -R parameter might work (note the capitalization). It will import using regional settings, but that's probably the exact issue you're having.
Go to Top of Page
   

- Advertisement -