2012年2月25日星期六

BCP command with arguments having special chars

Hi all,

The command is as follows:

BCP asdos+_reports..StageCONTACTINFO OUT C:\16E8.tmp -w -b10000 -t"|" -r\n
-Sblrkec28791d\sqlserver -Uadmin -Padmin -eC:\ERRCONTACTINFO.txt

Here, since the first argument(database name) has a special char '+' in
it, the command gives a syntax error. How can i escape it? Double quotes"",
[] didnt work!! Pls help!

TIAYour thread in microsoft.public.sqlserver.programming on this subject is
still active. See my response.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Sundar" <sundar.jammy@.gmail.com> wrote in message
news:b4d47b8e.0411040547.7c8ed064@.posting.google.c om...
> Hi all,
> The command is as follows:
> BCP asdos+_reports..StageCONTACTINFO OUT C:\16E8.tmp -w -b10000 -t"|" -r\n
> -Sblrkec28791d\sqlserver -Uadmin -Padmin -eC:\ERRCONTACTINFO.txt
> Here, since the first argument(database name) has a special char '+' in
> it, the command gives a syntax error. How can i escape it? Double
> quotes"",
> [] didnt work!! Pls help!
> TIA

没有评论:

发表评论