| Author |
Topic |
|
wshtrue
Yak Posting Veteran
74 Posts |
Posted - 2005-06-05 : 13:22:13
|
| Hello Guys,I have a question on DTS and Job? I dont'know anything about DTS and Jobs? My question is if requirement says that job has to be run every day then what statement should be used and where that statement needs to be used? If i want my job to run 4 times a day so what statement do i need to use and where.Please do answer my question i am a beginner programmer and senior programmers are really confusing me.Thank you in advance. |
|
|
rockmoose
SQL Natt Alfen
3279 Posts |
Posted - 2005-06-05 : 14:31:44
|
| You should not be responsible for scheduling jobs on sql-server if You are just a beginner programmer.If the people You work for are letting You do this on anything else than a "learn & play" server, they are irresponsible.If You want to learn how to do this, look up relevant topics in BOL (Books Online, the SQL Server manual).Read about "Jobs" & "DTS packages", BOL will tell You how to schedule them.rockmoose |
 |
|
|
wshtrue
Yak Posting Veteran
74 Posts |
Posted - 2005-06-05 : 14:57:17
|
| Thank you for your response! No, i think when i said that i am a beginner programmer I didn't mean that i have to schedule a job i just need to test that a person who has scheduled a job has done it correctly. First time he said that query was written like datediff(hh,Firstcolumn, secondcolumn)>24 and he said this means Job would be scheduled once a day but requirement was run it 4 times a day and he did it like datediff(hh,Firstcolumn, secondcolumn)>6 and he said now it will run 4 times a day.I am not sure so my question was if it has to run four times a day then shouldn't it be like datediff(hh,Firstcolumn, secondcolumn)>4Correct me if i am wrong.Thanks |
 |
|
|
rockmoose
SQL Natt Alfen
3279 Posts |
Posted - 2005-06-05 : 15:09:34
|
| We must be talking apples and oranges.What "datediff(hh,Firstcolumn, secondcolumn)>6" meansis simply that there are >6 hours difference between Firstcolumn and secondcolumn.How did he "schedule a job" ???Do You have a job that runs many times a day, and somewhere in the code You check for this condition:datediff(hh,Firstcolumn, secondcolumn) > 6 ???rockmoose |
 |
|
|
wshtrue
Yak Posting Veteran
74 Posts |
Posted - 2005-06-05 : 15:25:19
|
| Thank You for your response! First time i was absolutely right.I told him that this query means that difference between thse two fields is whatever like >24 or >6 but it doesn't mean that Job will be run once a day or 4 times a day. He said No you are new and you don't understand this >6 means 6*4=24 that means it will run 4 times.I said i might be a new programmer but atleast i understand this statement datediff(hhh,firstcolumn,secondcolumn)>6 there is no calculation that is saying that you have to multiply with 4.I definitely don't know about how to schedule a job so if a person has to schedule a job 4 times a day then what should be the query? Could you be kind enough to let me know.I would really appreciate your help. I had told him the same thing that these are absolutely two different things but being a new programmer i thought may be i don't understand.Thanks |
 |
|
|
wshtrue
Yak Posting Veteran
74 Posts |
Posted - 2005-06-05 : 15:28:56
|
| Hello,Right now in the code it says datediff(hh,Firstcolumn, secondcolumn) > 6 so does it mean that he is right and it will run 4 times a day? Thanks |
 |
|
|
rockmoose
SQL Natt Alfen
3279 Posts |
Posted - 2005-06-05 : 15:45:59
|
Read the topics in BOL about Jobs, and how to schedule them.If You are going to have discussion with this developer,then at least You must have a clue about what You are discussing.Answer this question:How are You "scheduling the jobs" ?do you have a homegrown solution, or are You using Sql Server Agent ?quote: Originally posted by wshtrue Hello,Right now in the code it says datediff(hh,Firstcolumn, secondcolumn) > 6 so does it mean that he is right and it will run 4 times a day? Thanks
No it means that "datediff(hh,Firstcolumn, secondcolumn) > 6" will evaluate to true if there is more than 6 hours between Firstcolumn and secondcolumn. Nothing to do with job-scheduling.24/6 = 4, Nothing to do with job-scheduling either.rockmoose |
 |
|
|
wshtrue
Yak Posting Veteran
74 Posts |
Posted - 2005-06-05 : 15:56:13
|
| Thank You! I appreciate your time and your help.I will read about jobs right now.Thanks |
 |
|
|
|