Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««23456»»»

Date Calendar Expand / Collapse
Author
Message
Posted Thursday, July 22, 2010 5:05 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Thursday, July 30, 2015 12:42 PM
Points: 394, Visits: 777
Thanks. :)
Post #957670
Posted Thursday, January 13, 2011 6:35 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: 2 days ago @ 9:04 PM
Points: 8, Visits: 707
Hello,
Has there been a revision to add and/or flag if it's a business day e.g. Y or N. This equates not holidays and weekends, preferably in the US. Please send the script.

Thanks
Post #1047217
Posted Thursday, January 13, 2011 7:01 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Thursday, July 30, 2015 12:42 PM
Points: 394, Visits: 777
Sorry, no. Life's been busy lately. Celebrating our first child. :) It's on the "to do" list though (which seems to be getting longer each day!). ;) I will post when there is an update though.
Post #1047241
Posted Thursday, January 13, 2011 8:23 AM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Wednesday, July 22, 2015 8:23 AM
Points: 535, Visits: 834
This is mentioned in my post Calculate U.S. Holidays at [url=http://www.sqlservercentral.com/scripts/holiday/70424/][/url]. I just added a column is_workday to Sean's existing script, then made my holiday script. Hope that helps!

____________________________________________________________________________________________
Remember as you walk down lifes road, don't forget to stop and pee on the bushes - Thordog
Post #1047326
Posted Thursday, January 13, 2011 8:27 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Thursday, July 30, 2015 12:42 PM
Points: 394, Visits: 777
Ah yes! I had forgotten about this script. Thanks Thordog! :)
Post #1047328
Posted Thursday, January 13, 2011 9:04 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Wednesday, October 1, 2014 6:12 AM
Points: 60, Visits: 179
Thordog, very nice addition. I added holiday_name to it.
Post #1047374
Posted Thursday, January 13, 2011 9:30 AM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Wednesday, July 22, 2015 8:23 AM
Points: 535, Visits: 834
Gitmo, cool! Sean did a great job on that table. I have programmers I show it to that still use SQL date functions against the table. The whole point is you don't need any dateadd or datediff with this table, good grief!

____________________________________________________________________________________________
Remember as you walk down lifes road, don't forget to stop and pee on the bushes - Thordog
Post #1047393
Posted Thursday, January 13, 2011 9:45 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Thursday, July 30, 2015 12:42 PM
Points: 394, Visits: 777
LOL! I've seen the same thing!! When I show them how to properly use the table they're like, "Oh... OOOOHHHH!"
Post #1047408
Posted Wednesday, April 13, 2011 1:36 PM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Monday, July 27, 2015 6:13 AM
Points: 437, Visits: 1,032
At the risk of exposing how much I might not know, why all the alter statements changing fields from tinyint to int, as well as NOT NULL? I would assume that the changing of populated columns to be NOT NULL helps performance, (and I'll be happy to read why if someone could point me to where to search for that hint) but why not define the int fields as int at table create?

Other than that, I have every plan to make use of this - kind of a Swiss Army Knife utlity table. Thanks in advance for the slightly off topic answer to my question.

Bob
Post #1093141
Posted Thursday, April 14, 2011 6:06 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Thursday, July 30, 2015 12:42 PM
Points: 394, Visits: 777
That's probably just a bad on my side. I may have originally set the columns to INT in the CREATE TABLE statement then changed it to TINYINT and forgot to adjust the corresponding ALTER TABLE statement. The NOT NULL is added after the fact because until the column is populated with data during the build, it can be NULL, but after it shouldn't be. It allows for error checking (if any values get missed during population) and allows for a developer to know that the column should always contain data when looking at the table definition.
Post #1093442
« Prev Topic | Next Topic »

Add to briefcase «««23456»»»

Permissions Expand / Collapse