1st question is in a store procedure exec xp_cmdShell can i call another store procedure.
if so why doesn"t it like when i pass it variables... i thought of doing this because select statement is long...
by doing a simple select * from tablename the file gets created with the info so that works fine...
thanking you in advance
Exec DBName..xp_cmdshell 'bcp "'exec sp_AutoReplenishment' + @intSCate1 + ',' +@intSCate2+ ',' + @intvendor" queryout "C:\PO.csv" -T -c -t,'
Last edited by RinoDM; March 29th, 2012 at 11:25 AM..