Link to home
Start Free TrialLog in
Avatar of 25112
25112

asked on

BCP - Generate CSV from SQL - syntax



I tried

C:\Users\luj>BCP poserv4..vw_posnos out c:\posnos.csv -c -T -t, -S<poserv4> from dos prompt
but i get back..
The syntax of the command is incorrect.

what could be wrong? -T is trusted (windows authentication> -t is to separate by comma
poserv4 is the server name.. i want the results of the view vw_posnos into csv format..
ASKER CERTIFIED SOLUTION
Avatar of Wizilling
Wizilling
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of 25112
25112

ASKER

first i was using <>.. i changed it but still fails..
C:\Users\luj>BCP poserv4..vw_posnos out c:\posnos.csv -c -t, -T -Sposerv4
Unknown argument 'ûSposerv4' on command line.

C:\Users\luj>BCP poserv4..vw_posnos out c:\posnos.csv -c -t, -T -S poserv4
Unknown argument 'ûS' on command line.

C:\Users\luj>
Avatar of 25112

ASKER

it must have been a illegible characters.. i typed again slowly and it worked.. thanks Wizilling: