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)
 Problems using Bulk Insert on CSV files created by Access

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-05-20 : 08:24:30
Andy writes "I'm using SQL Server 2000 sp3 on Windows 2000 Server.

I have a problem importing data via the Bulk Insert function with a CSV data file created using either Access or Excel as they place currency symbols in front of curreny fieds.

I have used a format file which explains that standard ACSII CSV files should always used SQLCHAR as the host data type. If I do this it falls over due to the currency field, if I change it to a native SQL data type like SQLMONEY it works but the data is messed up.

I can not use DTS as I not able to use and account with sufficient premissions, belive me I've tried, so this seems like the next best thing, if not even better.

If this is something I need to sort out from the Access side of things my appologies, but if its an SQL issue then please please help me, I've been trying for nearly three weeks to crack this."

X002548
Not Just a Number

15586 Posts

Posted - 2003-05-20 : 15:50:18
Well the following works:


USE NorthWind
GO
CREATE TABLE myTable1(col1 int IDENTITY(1,1), col2 money)
GO
INSERT INTO myTable1(col2) SELECT $123.00
GO
SELECT * FROM myTable1
GO


Maybe you should export the file as comma delimited with text identifiers..



Brett

8-)
Go to Top of Page
   

- Advertisement -