I am writing a program to load all rows from a csv file into a mssql table using bsp command the command i gave is as follows
bcp "DBNAME.DB_USER.tableName in fileName.csv -m 50000 -f fileName.fmt -e Bad.log -C RAW -S DBSERVR -U DB_USER -P DB_PASSWORD -k
say there are three records in the csv file, data is getting imported into the table but only first two records are inserted in the table the bad file is empty not sure which option i missed in the bcp command. I want to load all three records in the table the records are seperated by new link char, also
This was first now the second,
what if i want to skip the first record of the csv file which option should i be using for this. Plz let me know
Default is to insert ALL rows so only use -F (and -L for last row) if you don't want all rows (e.g. if there is a header).
Does your last row in the CSV have a row terminator at the end? (default is newline).