the comman i used is:
bcp test.dbo.table in c:\a.csv -c -t , -S "127.0.0.1" -U "sa" -P ""
but i can't import the file into the database
but when i replace the null in the file ,it successed
how can i imort the data successfully without replacing then null in the file.
the file is too big,
1) Get the file to write out correctly in the first place. I assume your answer will be "I can't - not my process" etc.
2) Create a staging table with bugger all constraints. VARCHAR for all data types. BCP into there. Replace "null" with NULL and any other data cleansing you need to do. Then insert into the final destination table.