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 |
|
igorblackbelt
Constraint Violating Yak Guru
407 Posts |
Posted - 2004-12-20 : 10:31:24
|
| I want to set up a SP that skips the holidays, does anybody has any idea or is there any other topic on this same... topic?Thanks!I Love Challenges! That's why I love coding! |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2004-12-20 : 10:59:10
|
| How do you know what a holiday is?Often this is done by a function which gets the next day / previous day and skips holidays / weekends.For queries though you wikll need to join to a holiday table and exclude weekends - maybe beiong country dependent.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2004-12-20 : 11:01:33
|
you'll need a table of holiday dates to join on...EDIT: Go with the flow & have fun! Else fight the flow |
 |
|
|
igorblackbelt
Constraint Violating Yak Guru
407 Posts |
Posted - 2004-12-20 : 11:21:00
|
| My company has a list of core holidays and we didn't have nothing set this year, I'm trying to implement something that woould skip the holidays. The table thing looks good, but let me know if you guys come accross with any other method.Thanks a lot.I Love Challenges! That's why I love coding! |
 |
|
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2004-12-20 : 11:32:17
|
quote: Originally posted by igorblackbelt I want to set up a SP that skips the holidays, does anybody has any idea or is there any other topic on this same... topic?
As mentioned,you need a table of these holidays.what do you mean by "skip" ? you need to define clearly what you are looking for in your stored procedure, what data should be returned and in what format.- Jeff |
 |
|
|
igorblackbelt
Constraint Violating Yak Guru
407 Posts |
Posted - 2004-12-20 : 11:39:09
|
| Well, since I work on a production enviroment, and I need to report all the production from yesterday or MTD or Monthly, I need to skip the holliday, like If yesterday was a holiday, give me the day before yesterday worth of data.I Love Challenges! That's why I love coding! |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
|
|
|
|
|