SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist cms9651's Avatar
    Join Date
    Mar 2010
    Posts
    407
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Working weeks in the year

    Hi there.

    I need to distribute equally these five names for the working weeks in the year, excluding saturday, sunday and holidays
    I need table with weeks of the year?

    Can you help me? Any suggestions?
    thank you
    Code:
    SET FOREIGN_KEY_CHECKS=0;
    
    -- ----------------------------
    -- Table structure for `tbl_names`
    -- ----------------------------
    DROP TABLE IF EXISTS `tbl_names`;
    CREATE TABLE `tbl_names` (
      `Names` varchar(50) DEFAULT NULL,
      `id` int(10) NOT NULL AUTO_INCREMENT,
      PRIMARY KEY (`id`)
    ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;
    
    -- ----------------------------
    -- Records of tbl_names
    -- ----------------------------
    INSERT INTO `tbl_names` VALUES ('George', '1');
    INSERT INTO `tbl_names` VALUES ('Laura', '2');
    INSERT INTO `tbl_names` VALUES ('Martin', '3');
    INSERT INTO `tbl_names` VALUES ('Arnold', '4');
    INSERT INTO `tbl_names` VALUES ('Betty', '5');
    Thanks you very much for your help
    I'm really happy for your quickly answer.
    Good bye

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,250
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by cms9651 View Post
    I need table with weeks of the year?
    i think so, yes

    but perhaps you could explain what you're doing so we understand it better
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Evangelist cms9651's Avatar
    Join Date
    Mar 2010
    Posts
    407
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    thanks for the reply.

    I should check that the the number weeks of work for the five names is the same for all... that is, there can not be a person who works more or less of other...
    Thanks you very much for your help
    I'm really happy for your quickly answer.
    Good bye


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •