Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

xp_cmdshell bcp

EXEC xp_cmdshell 'bcp "select * from (select ''a_id'' as a_id,''b_id'' as b_id,''c_id'' as c_id union select a_id,b_id,c_id from tablename)q order by case a_id when ''a_id'' then 0 ELSE 1 END" queryout "
etworkpatha.txt" -c -Uusername -Ppassword -Sservername -ddatabasename'
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #bcp
ADD COMMENT
Topic
Name
9+2 =