Re: BCP command where the arguments have a special char
From: Dan Guzman (guzmanda_at_nospam-online.sbcglobal.net)
Date: 11/04/04
- Next message: Uri Dimant: "Re: User Defined Function Help"
- Previous message: Martin Selway: "Re: SQL Statement Inserting Rows"
- In reply to: Sundar: "Re: BCP command where the arguments have a special char"
- Next in thread: Sundar: "Re: BCP command where the arguments have a special char"
- Reply: Sundar: "Re: BCP command where the arguments have a special char"
- Reply: Sundar: "Re: BCP command where the arguments have a special char"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 4 Nov 2004 07:42:03 -0600
I made a copy/paste error in the example. The direction should be
'queryout':
BCP "SELECT * FROM [asdos+_reports]..StageCONTACTINFO" queryout
C:\16E8.tmp -w -b10000 -t"|" -r\n -Sblrkec28791d\sqlserver -Uadmin -Padmin -eC:\ERRCONTACTINFO.txt
-- Hope this helps. Dan Guzman SQL Server MVP "Sundar" <Sundar@discussions.microsoft.com> wrote in message news:163DBC82-BE15-4777-853B-B98E93620A8C@microsoft.com... >I tried the cmd as given but got the following error, > > Copy redirection should be either 'IN' or 'OUT' > > where should i give the 'OUT'? > > TIA > > "Dan Guzman" wrote: > >> Try queryout like the example below. You can avoid issues like this by >> ensuring your database and object names conform to the rules for >> identifiers >> as described in the Books Online. >> >> BCP "SELECT * FROM [asdos+_reports]..StageCONTACTINFO" query >> C:\16E8.tmp -w -b10000 -t"|" -r\n -Sblrkec28791d\sqlserver -Uadmin -Padmin >> -eC:\ERRCONTACTINFO.txt >> >> >> -- >> Hope this helps. >> >> Dan Guzman >> SQL Server MVP >> >> "Deepu V" <DeepuV@discussions.microsoft.com> wrote in message >> news:A4DFDDB3-5310-49F5-8480-9C41EA25182D@microsoft.com... >> > 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 >> >> >>
- Next message: Uri Dimant: "Re: User Defined Function Help"
- Previous message: Martin Selway: "Re: SQL Statement Inserting Rows"
- In reply to: Sundar: "Re: BCP command where the arguments have a special char"
- Next in thread: Sundar: "Re: BCP command where the arguments have a special char"
- Reply: Sundar: "Re: BCP command where the arguments have a special char"
- Reply: Sundar: "Re: BCP command where the arguments have a special char"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|