Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 osql syntax

Author  Topic 

rubs_65
Posting Yak Master

144 Posts

Posted - 2005-09-26 : 13:28:51
We have to implement as a step in sql server job:
1) look for a filename stored as a column in a table( and may be store it in a variable)
2) Use that filename in a backup command in the same step

We are trying to do a cmdexec step in sql server job and now have to call osql and look for a column and store the result in a variable and use that variable in a backup command.
What will be the osql syntax to call a query and store the result in a variable?

Thanks
--Harvinder
   

- Advertisement -