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.
Author |
Topic |
lmayer4
Starting Member
33 Posts |
Posted - 2012-05-23 : 08:46:10
|
Good morning,I have to load a bunch of different data every week to an external program. Right now its manageabele since I just go into the job and change the where clause in the steps. I am leaving this job and I need to make it as easy as possible for the guy who's here. I was thinking of a parameter but some weeks they want locations and some weeks they want materials. I'm wondering if there is a way to either do this with a parameter or is it to changeable?ThanksLaura |
|
Bustaz Kool
Master Smack Fu Yak Hacker
1834 Posts |
Posted - 2012-05-23 : 12:25:27
|
I don't know of a way to directly pass parameters to a job. The best I could come up with was to read in the desired values from a known table at the front end of the job. My real question is whether this would be easier done as a SQL script instead of a job.=================================================There is a foolish corner in the brain of the wisest man. -Aristotle, philosopher (384-322 BCE) |
 |
|
yosiasz
Master Smack Fu Yak Hacker
1635 Posts |
Posted - 2012-05-23 : 12:32:14
|
this might the foolish part of my brain talking but what you can do is create a table with two columnsLoadByValue, EnabledYesNoinsert two rowsLoadByValue EnabledYesNoBy Locations 0By materials 1 Add a unique Index on EnabledYesNo so both do not runuse this in your sql job which you should probably create a sproc for. In the query or sproc create an IF statement that populates either locations or materials based on the above table<><><><><><><><><><><><><><><><><>If you don't have the passion to help people, you have no passion |
 |
|
|
|
|