• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 405
  • Last Modified:

osql and passing variable

I am working at creating an osql statement to run with a SQL job, allowing it to run at a set schedule.  I will be passing the -o switch in order to force it to save to a file, but is there any way to pass a variable into the file name?
Ideally, I would want to append the date to the filename so that there is not a fear of it being overwritten.

Thanks
0
cjmara
Asked:
cjmara
  • 2
  • 2
1 Solution
 
jorge_torizResearch & Development ManagerCommented:
Use SSIS package instead of your osql statement.
0
 
cjmaraAuthor Commented:
Can you offer a suggestion on where to find some further information on SSIS?

Thanks,
0
 
jorge_torizResearch & Development ManagerCommented:
A little example about using variables

http://www.mssqltips.com/tip.asp?tip=1443
0
 
cjmaraAuthor Commented:
Thank you.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now