Beat this - comic relief for the day

  • Stumbled across this at work, just had to share.

    SET QUOTED_IDENTIFIER ON

    GO

    SET ANSI_NULLS ON

    GO

    ALTER procedure dbo.spProviderDirectoryReportWithAllServiceLocations

    AS

    Select *

    From

    vwProviderDirectoryReportWithAllServiceLocations

    GO

    SET QUOTED_IDENTIFIER OFF

    GO

    SET ANSI_NULLS ON

    GO

    How's that for efficient? :w00t:

    ---------------------------------------------------------
    How best to post your question[/url]
    How to post performance problems[/url]
    Tally Table:What it is and how it replaces a loop[/url]

    "stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."

  • Sweet. Nice security. No one will ever know that we're running everything off an Access DB

    ----------------------------------------------------The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood... Theodore RooseveltThe Scary DBAAuthor of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd EditionProduct Evangelist for Red Gate Software

  • That guy needs a raise! 😛

  • I can't help but wonder if the view definition looks something like:

    create view vwProviderDirectoryReportWithAllServiceLocations

    as

    Select *

    From

    ProviderDirectoryReportWithAllServiceLocations

    end



    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]

  • Heh... c'mon now... {clutching sides in laughter... almost fell out of chair}, that developer is doing the best (s)he can...

    Thanks for the Friday laugh...

    Steve, you should start a "Darwin Award" forum... this should be the first entry. 😛

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)
    Intro to Tally Tables and Functions

  • Well, not to give competition to Steve... OK, it won't, but there is

    www.sqldumbass.com

    ----------------------------------------------------The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood... Theodore RooseveltThe Scary DBAAuthor of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd EditionProduct Evangelist for Red Gate Software

  • Alvin Ramard (8/1/2008)


    I can't help but wonder if the view definition looks something like:

    create view vwProviderDirectoryReportWithAllServiceLocations

    as

    Select *

    From

    ProviderDirectoryReportWithAllServiceLocations

    end

    Or

    create view vwProviderDirectoryReportWithAllServiceLocations

    as

    Select *

    From

    tbProviderDirectoryReportWithAllServiceLocations

    to keep with the prefix style.

    I think someone took the 'use stored procedures' rule just a little far.

    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
  • Grant Fritchey (8/2/2008)


    Well, not to give competition to Steve... OK, it won't, but there is

    www.sqldumbass.com

    I love that blog. Just wish it was updated more often.

    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
  • What I think is interesting about that blog, is that it's the person writing the blog who is sometimes the "dumbass". One guy wrote about the ol' turbo button prank trick he played on a developer who actually took the time to ask for help... that developer will never ask that DBA for help again and that's a real shame. The DBA was nothing but a BSOFH.;)

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)
    Intro to Tally Tables and Functions

  • I thought much the same on that particular post, though there may be history that we don't know of. The other authors are fine (imho)

    I think you'll appreciate the latest posting there. :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
  • Jeff Moden (8/2/2008)


    The DBA was nothing but a BSOFH.;)

    Uuuhh, ... "Big Stupid Old Fart-Head"?

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • rbarryyoung (8/2/2008)


    Jeff Moden (8/2/2008)


    The DBA was nothing but a BSOFH.;)

    Uuuhh, ... "Big Stupid Old Fart-Head"?

    Heh... Ummm... no... what's your user name again? 😉

    http://members.iinet.net.au/~bofh/bofh/bofh2.html

    http://members.iinet.net.au/~bofh/

    The "SO" stands for "SysOP"... you can figure out the rest from the links above. They're actually funny as all get out... 😛

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)
    Intro to Tally Tables and Functions

  • Oh yeah, I remember that one from way back. Heh.

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • Heh... I just saw this code posted on our very own forums as part of some dynamic SQL... link withheld to protect the guilty... 😉

    ,CASE schedule.[letter_box_yn] WHEN ''Y'' THEN ''Y'' WHEN ''N'' THEN ''N'' END AS ''letter_box''

    ,CASE schedule.[continued_yn] WHEN ''Y'' THEN ''Y'' WHEN ''N'' THEN ''N'' END AS ''continued''

    ,CASE schedule.[subtitled_yn] WHEN ''Y'' THEN ''Y''WHEN ''N'' THEN ''N'' END AS ''subtitled''

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)
    Intro to Tally Tables and Functions

Viewing 15 posts - 1 through 15 (of 23 total)

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