Friday, February 10, 2012

convert data file type from unix to pc using stored procedure?

Hi, I have a script written in ASP to load data file (.csv) to ms sql. In the script, I have a portion of script looks like taht :

....

Do While NOT oInFile.AtEndOfStream
oOutFile.WriteLine Replace(oInFile.Readline, chr(13), vbcrlf)
Loop

....

After that, I will use a BULK INSERT to input data to ms sql.

I am wondering how do I convert each row (data) to vbcrlf in Stored Procedure? Coz' I did not compose the convertion part, and I got no error when running BULK INSERT, but no rows are inserted :( HELP!!!!

I guess it's because the file is not being converted into a correct format??

Can you give more information? e.g.: sample text used in BULK INSERT, BULK INSERT command you're using, and the schema of the destination table.

No comments:

Post a Comment