sql - BCP Parameter issues -


i hope i'm not re-asking.. but..

here's pertinent section of sql. view in question (vw_tempallitems) created in prior steps, , yes created using column names, , paying attention types & etc.. view works 100%.. bcp, not much..

--------------------------------------------------------------- declare @bcpcommand varchar(2000)  set @bcpcommand = 'bcp vw_tempallitems out "c:\fepdata.csv" -c -t -u user -p pwd'  exec master..xp_cmdshell @bcpcommand go  drop view vw_tempallitems go ---------------------------------------------------------------- 

the thing results pane shows bcp command parameters

    usage: bcp {dbtable | query} {in | out | queryout | format} datafile     [-m maxerrors]            [-f formatfile]          [-e errfile]     [-f firstrow]             [-l lastrow]             [-b batchsize]     [-n native type]          [-c character type]      [-w wide character type]     [-n keep non-text native] [-v file format version] [-q quoted identifier]     [-c code page specifier]  [-t field terminator]    [-r row terminator]     [-i inputfile]            [-o outfile]             [-a packetsize]     [-s server name]          [-u username]            [-p password]     [-t trusted connection]   [-v version]             [-r regional enable]     [-k keep null values]     [-e keep identity values]     [-h "load hints"]         [-x generate xml format file]     [-d database name]     null 

and csv file not created..

anyone?

for one, try making query:

set @bcpcommand = 'bcp "select * vw_tempallitems" out "c:\fepdata.csv" -c -t -u user -p pwd' 

also, answer question, check out: how pass parameter bcp command in sql server on stackoverlow.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -