Quantcast
Channel: Spiceworks Community - Latest topics
Viewing all articles
Browse latest Browse all 183715

batch script for taking records from table

$
0
0

I have stored the count of files in a table already.I need to retrieve the count from table to the batch out file after the filename.Ex:xyz001. Below is the script
"bcp "select * from Table_name" queryout "D:\xyz'select count from table'.txt"-U user -P pwd -S connection
In that i need to use select query after the file name to make the file name "xyz001.txt".

Thanks in advance


Viewing all articles
Browse latest Browse all 183715