Quantcast
Channel: ฟอรัม Getting started with SQL Server
Viewing all articles
Browse latest Browse all 8428

CSV file with row terninator as LF character using BCP

$
0
0

Hi,

I want to create csv file using BCP command with row terminator as LF character .I am using below command , Data is coming properly in csv file butCRLF character is coming in the last of each line.

exec  master..xp_cmdshell 'bcp test out C:\FCOPMT\x.csv -c -r "\n" -t "," -S SERVER_NAME -U "DB_USER" -P "DB_USER_PASSWORD"'

I have tried another options like "0x0A" instead of "\n" but still getting CRLF in the last of each line.


Viewing all articles
Browse latest Browse all 8428

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>