August 30, 2009 at 10:58 pm
Hi all,
I'm trying to use bcp to export results of a query, the problem is the database uses a column named 'transaction' which of course Sql Server doesn't like. In mgmt studio I can use:
select * from database.dbo."transaction" and it works but
c:\bcp "select * from database.dbo."transaction""
does not. I've tried just about every other possibility of quotes, double quotes, single quotes, etc etc but can't get it
Thanks in advance
CT
August 31, 2009 at 1:39 am
thombaugh (8/30/2009)
Hi all,I'm trying to use bcp to export results of a query, the problem is the database uses a column named 'transaction' which of course Sql Server doesn't like. In mgmt studio I can use:
select * from database.dbo."transaction" and it works but
c:\bcp "select * from database.dbo."transaction""
does not. I've tried just about every other possibility of quotes, double quotes, single quotes, etc etc but can't get it
Thanks in advance
CT
Try writing [transaction] instead of "transaction"
Adi
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
August 31, 2009 at 9:01 am
Fantastic! That did it. I would have never thought of brackets in a million years.
Many thanks, Adi.
CT
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply