Are the posted questions getting worse?

  • Stefan Krzywicki (8/4/2010)


    mtillman-921105 (8/4/2010)


    ALZDBA (8/4/2010)


    GilaMonster (8/4/2010)


    Jack Corbett (8/4/2010)


    Probably the most complex SQL I've had to write. Too many OUTER JOINs (business requires this design), and then parameters that could turn the OUTER JOINs to INNER JOINs and may not be what the business wants in some cases.

    Swap?

    I got stuck this afternoon helping out with a query where I needed to add several columns that stored elapsed time.

    Easy enough? Sure, except that the person who designed the database stored those elapsed times as the TIME datatype.

    And you can't add two time columns. Makes sense, there's no meaning to 11am + 5pm. However in this case 11am meant 11 hours and 5pm meant 17 hours. Cue multiple conversions to datetime followed by DATEPART(mi,...) followed by DATEADD followed by a cast back to TIME.

    and how do they store +24 hours in that time column ? (add an extra daycounter column ??) ๐Ÿ˜‰

    When can we convert to Metric Time?

    Metric time really isn't all that farfetched! You'd have 10 hours in a day, 100 minutes in an hour and 100 seconds in a minute. The only adjustment that needs to to be made is to make the second a little longer than the second is now.

    Now that would suck!!!! There would only be 2 hours left in the days after putting in an 8 hour work day. WAIT!! Add the 1 hour for lunch and you only have 1 hour left! WAIT!!! Add 35 minute commute to get to work and ..... I just ran out of time!!!! :w00t:

    Excuse me boss, can I leave a few minutes early so I can get back to work on time? ๐Ÿ˜›



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • Alvin Ramard (8/4/2010)


    Excuse me boss, can I leave a few minutes early so I can get back to work on time? ๐Ÿ˜›

    ROTFLMAO

    Stop spying on my workplace!

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • ALZDBA (8/4/2010)


    and how do they store +24 hours in that time column ? (add an extra daycounter column ??) ๐Ÿ˜‰

    Can't happen. There's a row per day and the hours in all the columns cannot add up to more than 24

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Stefan Krzywicki (8/4/2010)


    Metric time really isn't all that farfetched! You'd have 10 hours in a day, 100 minutes in an hour and 100 seconds in a minute. The only adjustment that needs to to be made is to make the second a little longer than the second is now.

    That's the easy bit. But it doesn't really work until the reaction to the tidal effects of the earth's mass on the sun slows the earth's rotation enough so that we have a 100 day year. That won't be for a long time yet, so I don't expect to see decimal time in my lifetime, even if I do manage to get dbcc timewarp to restore the database containing the description of a simple procedure for gaining effective immortality onto my laptop.

    Of course I see metric time already - we've had clocks, eggtimers, and sandglasses for a long time now, and I'm not one to allow a bunch of foreigners to usurp a perfectly good word like "metric" and claim it means something that it doesn't.

    Tom

  • Oh, switching topics.

    We had the best Mongolian BBQ place in town a few years back. Now it's gone. I miss it so much. I need to track down a new one.

    Has anyone here ever had Mongolian BBQ?

    I've been to one in Kansas City several times. Love it!

    The Redneck DBA

  • Alvin Ramard (8/4/2010)


    Stefan Krzywicki (8/4/2010)


    mtillman-921105 (8/4/2010)


    ALZDBA (8/4/2010)


    GilaMonster (8/4/2010)


    Jack Corbett (8/4/2010)


    Probably the most complex SQL I've had to write. Too many OUTER JOINs (business requires this design), and then parameters that could turn the OUTER JOINs to INNER JOINs and may not be what the business wants in some cases.

    Swap?

    I got stuck this afternoon helping out with a query where I needed to add several columns that stored elapsed time.

    Easy enough? Sure, except that the person who designed the database stored those elapsed times as the TIME datatype.

    And you can't add two time columns. Makes sense, there's no meaning to 11am + 5pm. However in this case 11am meant 11 hours and 5pm meant 17 hours. Cue multiple conversions to datetime followed by DATEPART(mi,...) followed by DATEADD followed by a cast back to TIME.

    and how do they store +24 hours in that time column ? (add an extra daycounter column ??) ๐Ÿ˜‰

    When can we convert to Metric Time?

    Metric time really isn't all that farfetched! You'd have 10 hours in a day, 100 minutes in an hour and 100 seconds in a minute. The only adjustment that needs to to be made is to make the second a little longer than the second is now.

    Now that would suck!!!! There would only be 2 hours left in the days after putting in an 8 hour work day. WAIT!! Add the 1 hour for lunch and you only have 1 hour left! WAIT!!! Add 35 minute commute to get to work and ..... I just ran out of time!!!! :w00t:

    Excuse me boss, can I leave a few minutes early so I can get back to work on time? ๐Ÿ˜›

    LOL, I think you'd have to change the hours you work. Doesn't a nice 3 hour work day sound great! And imagine the hourly rate you could charge!

    --------------------------------------
    When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
    --------------------------------------
    Itโ€™s unpleasantly like being drunk.
    Whatโ€™s so unpleasant about being drunk?
    You ask a glass of water. -- Douglas Adams

  • Tom.Thomson (8/4/2010)


    Stefan Krzywicki (8/4/2010)


    Metric time really isn't all that farfetched! You'd have 10 hours in a day, 100 minutes in an hour and 100 seconds in a minute. The only adjustment that needs to to be made is to make the second a little longer than the second is now.

    That's the easy bit. But it doesn't really work until the reaction to the tidal effects of the earth's mass on the sun slows the earth's rotation enough so that we have a 100 day year. That won't be for a long time yet, so I don't expect to see decimal time in my lifetime, even if I do manage to get dbcc timewarp to restore the database containing the description of a simple procedure for gaining effective immortality onto my laptop.

    Of course I see metric time already - we've had clocks, eggtimers, and sandglasses for a long time now, and I'm not one to allow a bunch of foreigners to usurp a perfectly good word like "metric" and claim it means something that it doesn't.

    Now you're talking metric dates and that's different. Remember, in SQL Server 2008 there's separate date and time types, you don't have to lump them all together any more!

    --------------------------------------
    When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
    --------------------------------------
    Itโ€™s unpleasantly like being drunk.
    Whatโ€™s so unpleasant about being drunk?
    You ask a glass of water. -- Douglas Adams

  • The US hasn't adopted the Metric system yet, so there's very little chance we'll see the date/time system go metric, well, any further than it already is.

    Decade, century, and millenium, are decimal based.



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • Jack Corbett (8/4/2010)


    GilaMonster (8/4/2010)


    Jack Corbett (8/4/2010)


    Probably the most complex SQL I've had to write. Too many OUTER JOINs (business requires this design), and then parameters that could turn the OUTER JOINs to INNER JOINs and may not be what the business wants in some cases.

    Swap?

    I got stuck this afternoon helping out with a query where I needed to add several columns that stored elapsed time.

    Easy enough? Sure, except that the person who designed the database stored those elapsed times as the TIME datatype.

    And you can't add two time columns. Makes sense, there's no meaning to 11am + 5pm. However in this case 11am meant 11 hours and 5pm meant 17 hours. Cue multiple conversions to datetime followed by DATEPART(mi,...) followed by DATEADD followed by a cast back to TIME.

    Sure, especially now that you've solved your problem.:w00t:

    I've solved one of them. Got several more nice complex date and time related calculations still to do tomorrow. :hehe:

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Alvin Ramard (8/4/2010)


    The US hasn't adopted the Metric system yet, so there's very little chance we'll see the date/time system go metric, well, any further than it already is.

    Decade, century, and millenium, are decimal based.

    Good point about longer periods of time.

    I'd say the US has adopted the metric system! At least we've adopted it about as well as we've acccepted speed limits.

    I'm very much in favor of the standardized calendar. 13 months of 4 weeks each, 7 days a week. At the beginning of the year, you have a holiday that isn't associated with any month called YearDay or NewYearsDay for the traditionalists and you make the holiday a day longer in leap years.

    --------------------------------------
    When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
    --------------------------------------
    Itโ€™s unpleasantly like being drunk.
    Whatโ€™s so unpleasant about being drunk?
    You ask a glass of water. -- Douglas Adams

  • I vote no. I like my watch. I don't want to have to buy a new one that has 10 digits.

    Plus I have this cool clock:

  • Steve Jones - Editor (8/4/2010)


    I vote no. I like my watch. I don't want to have to buy a new one that has 10 digits.

    Plus I have this cool clock:

    You know, I'll never understand why people are so willing to say "a quarter of" or "half past", but never say "a third of" or "a sixth after" or "a twelfth after".

    --------------------------------------
    When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
    --------------------------------------
    Itโ€™s unpleasantly like being drunk.
    Whatโ€™s so unpleasant about being drunk?
    You ask a glass of water. -- Douglas Adams

  • Steve Jones - Editor (8/4/2010)


    I vote no. I like my watch. I don't want to have to buy a new one that has 10 digits.

    Plus I have this cool clock:

    Hey, isn't that Phil Factor's clock? ๐Ÿ˜€

    The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge. - Stephen Hawking

  • Alvin Ramard (8/4/2010)


    The US hasn't adopted the Metric system yet, so there's very little chance we'll see the date/time system go metric, well, any further than it already is.

    Decade, century, and millenium, are decimal based.

    We should go metric on time only just out of spite. Plus, it would create jobs.

    โ””> bt



    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • mtillman-921105 (8/4/2010)


    Steve Jones - Editor (8/4/2010)


    I vote no. I like my watch. I don't want to have to buy a new one that has 10 digits.

    Plus I have this cool clock:

    Hey, isn't that Phil Factor's clock? ๐Ÿ˜€

    Doesn't his have like the cube root of 8 on it somewhere?

    Or was that 2 to the 3rd power?

    I'm not sure about that metric idea - if there are 10 hours in a day, what happens with Military time?

    As obsolete as Steve's fancy watch?

    Greg E

Viewing 15 posts - 17,086 through 17,100 (of 66,000 total)

You must be logged in to reply to this topic. Login to reply