Add another character not existing in table when export to text file
Clash Royale CLAN TAG#URR8PPP
@Squirrel that's such a good answer. I never think about that solution. so my command should be 'bcp "select name,age,grade from test" -i test.fmt queryout C:test.txt Is it right?
– Nguyen Van Hung
6 mins ago
should be
– Squirrel
2 mins ago
Add another character not existing in table when export to text file
I create a procedure to export data to text file. It be like:
'bcp "select name,age,grade from test" queryout C:test.txt
however i want to add some other character like |. And output file content would be like:
Jones|6 C.
Which is the most convenient way to do that. Should i create a temporary table?
|
BCP
@Squirrel that's such a good answer. I never think about that solution. so my command should be 'bcp "select name,age,grade from test" -i test.fmt queryout C:test.txt Is it right?
– Nguyen Van Hung
6 mins ago
should be
-f test.fmt
– Squirrel
2 mins ago
-f test.fmt
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
you mean use
|
as seperator ? use aBCP
format file– Squirrel
10 mins ago