February 8, 2005 at 11:35 pm
Hi,
I'm getting an invalid syntax near the keyword 'DATABASE' when I try to import a table through bcp. The source and destination tables both have a field named DATABASE. The other tables work fine so I'm guessing it's the fieldname. Is there anyway to get around this issue in bcp???
Allan
February 8, 2005 at 11:48 pm
Hi,
could you show us your query?
February 8, 2005 at 11:54 pm
Sorry there is no query. I export the table using
bcp DB1..PIPE_STUFF out \\OtherServer\Data\pipestuff.txt -T -n
then import on other server by
bcp DB2..PIPE_STUFF in \\OtherServer\Data\pipestuff.txt -T -n
BCP is doing all the work.....
Allan
February 9, 2005 at 12:06 am
Thank you for your correction. Query I meant command. So what I'd done if I were you is to put db2.pipe_stuff into " " :
bcp "DB1..PIPE_STUFF" out \\OtherServer\Data\pipestuff.txt -T -n
and
bcp "DB2..PIPE_STUFF" in \\OtherServer\Data\pipestuff.txt -T -n
If it won't help let me know
February 9, 2005 at 6:52 am
use the -q (quoted identifier) parameter to BCP
Far away is close at hand in the images of elsewhere.
Anon.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply