Batch script for displaying prefix

Closed
Satis1989
Posts
1
Registration date
Wednesday May 8, 2013
Status
Member
Last seen
May 8, 2013
- May 8, 2013 at 06:32 AM
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