bcp

  • exec

    xp_cmdshell'bcp "select top 5 * from sw_tokenDeletion"c:\TestMail\filename.txt" -c -U sa -P temp123 -S (172.25.11.20)'

    Sir It is showing result

    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]

    NULL

    (12 row(s) affected)

    Sir pls reply soon .........................(`_`)

  • You have missed the queryout option before the filename after the ". Look at example F here: http://msdn.microsoft.com/en-us/library/ms162802.aspx

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply