Are the posted questions getting worse?

  • ChrisM@Work (11/17/2015)


    From some time yesterday through to the present I've been noticing something a little odd. In the workplace, on the commute home last night (the walk, the tube, the train), on social media last night, on social media this morning, and on the commute back to work (the train, the tube, the walk). And now on ssc too.

    The background level of snarkiness is significantly higher than normal. Folks appear to be a little insensitive to one another, a little more selfish, and at the same time a little more sensitive to incoming remarks. I'm guilty, too - an acquaintance "let me go" last night because of something insensitive I posted.

    Sure as eggs are eggs it's something to do with the horror of the weekend awakening a seed of survivalism in us all. Please, just be aware of this for the next few days and be extra nice.

    Best wishes

    ChrisM

    +1

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • WayneS (11/16/2015)


    Lynn Pettis (11/13/2015)


    (think government contracted software development).

    My scary story when working with the gov't.

    Software contract awarded, specified that all data access has to go through stored procedures.

    They sent to me for my approval:

    CREATE PROCEDURE xyz (

    @ColumnList varchar(max),

    @From varchar(max),

    @Where varchar(max),

    @Order varchar(max)

    )

    AS

    declare @command varchar(max);

    SET @command = 'SELECT ' + @ColumnList + ' FROM ' + @From;

    IF @Where > '' SET @command = @command + ' WHERE ' + @Where;

    IF @Order > '' SET @command = @command + ' ORDER BY ' + @Order;

    EXECUTE (@command);

    GO

    Yep, that was the only procedure in the application.

    They quickly learned to hate me.

    May I please inject some SQL into your app and totally screw up your system? @=)

    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.

  • ChrisM@Work (11/17/2015)


    Brandie Tarvin (11/16/2015)


    Lynn Pettis (11/16/2015)


    Sorry, got snippy with an OP.

    50 lashes with a noodle please.

    My Patented Wet Noodle <tm> no less. Shame.

    EDIT: BTW, I'm teasing you, Lynn.

    Oh gosh, how 50 Shades is that? :blush:

    The safety word is DBCC TIMEWARP(). @=)

    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.

  • Lynn Pettis (11/16/2015)


    Ed Wagner (11/16/2015)


    Lynn Pettis (11/16/2015)


    And then you this type of question:

    ************(11/16/2015)


    How can i round off decimal number. E.g if i have 7.9---i need to round it off to 8, if i have 7.4---i need to round it off to 7...i tried round, ceiling.. but nothing got worked... please suggest

    I gave it a shot. We'll see if the shiny thing in my office is the crystal ball making an appearance or merely the sun beckoning me to go outside.

    At least you have sunshine. Looks like snowy weather is coming here for here.

    I saw that major snowstorm, but it looked like the brunt of hit was going to hit east of you. How did it turn out?

    I think our turn is coming here soon enough. Yesterday was in the 60s and this weekend we're supposed to struggle to get up to 40 and see the first snow of the year. The timing is about right.

  • Ed Wagner (11/17/2015)


    Lynn Pettis (11/16/2015)


    Ed Wagner (11/16/2015)


    Lynn Pettis (11/16/2015)


    And then you this type of question:

    ************(11/16/2015)


    How can i round off decimal number. E.g if i have 7.9---i need to round it off to 8, if i have 7.4---i need to round it off to 7...i tried round, ceiling.. but nothing got worked... please suggest

    I gave it a shot. We'll see if the shiny thing in my office is the crystal ball making an appearance or merely the sun beckoning me to go outside.

    At least you have sunshine. Looks like snowy weather is coming here for here.

    I saw that major snowstorm, but it looked like the brunt of hit was going to hit east of you. How did it turn out?

    I think our turn is coming here soon enough. Yesterday was in the 60s and this weekend we're supposed to struggle to get up to 40 and see the first snow of the year. The timing is about right.

    According to most of the people in this area, it's starting to get downright "frigid". We had a night in the 40s (f as opposed to c). Lots of people were lighting up their fireplaces because apparently central heat is not a thing Floridians generally worry about until they need it.

    I'd ask you to feel sorry for them, but I daresay I saw some grab the pork chop launcher a minute ago, so I'm going to run away now. @=)

    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.

  • The heatwave here has just broken, yesterday was the first rain for almost a month and a half (in our peak rainfall season). It's been seriously unpleasant here since early October.

    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
  • Brandie Tarvin (11/17/2015)


    Ed Wagner (11/17/2015)


    Lynn Pettis (11/16/2015)


    Ed Wagner (11/16/2015)


    Lynn Pettis (11/16/2015)


    And then you this type of question:

    ************(11/16/2015)


    How can i round off decimal number. E.g if i have 7.9---i need to round it off to 8, if i have 7.4---i need to round it off to 7...i tried round, ceiling.. but nothing got worked... please suggest

    I gave it a shot. We'll see if the shiny thing in my office is the crystal ball making an appearance or merely the sun beckoning me to go outside.

    At least you have sunshine. Looks like snowy weather is coming here for here.

    I saw that major snowstorm, but it looked like the brunt of hit was going to hit east of you. How did it turn out?

    I think our turn is coming here soon enough. Yesterday was in the 60s and this weekend we're supposed to struggle to get up to 40 and see the first snow of the year. The timing is about right.

    According to most of the people in this area, it's starting to get downright "frigid". We had a night in the 40s (f as opposed to c). Lots of people were lighting up their fireplaces because apparently central heat is not a thing Floridians generally worry about until they need it.

    I'd ask you to feel sorry for them, but I daresay I saw some grab the pork chop launcher a minute ago, so I'm going to run away now. @=)

    Aren't you in Florida? If so, that's definitely cold for you.

  • Ed Wagner (11/17/2015)


    Brandie Tarvin (11/17/2015)


    Ed Wagner (11/17/2015)


    Lynn Pettis (11/16/2015)


    Ed Wagner (11/16/2015)


    Lynn Pettis (11/16/2015)


    And then you this type of question:

    ************(11/16/2015)


    How can i round off decimal number. E.g if i have 7.9---i need to round it off to 8, if i have 7.4---i need to round it off to 7...i tried round, ceiling.. but nothing got worked... please suggest

    I gave it a shot. We'll see if the shiny thing in my office is the crystal ball making an appearance or merely the sun beckoning me to go outside.

    At least you have sunshine. Looks like snowy weather is coming here for here.

    I saw that major snowstorm, but it looked like the brunt of hit was going to hit east of you. How did it turn out?

    I think our turn is coming here soon enough. Yesterday was in the 60s and this weekend we're supposed to struggle to get up to 40 and see the first snow of the year. The timing is about right.

    According to most of the people in this area, it's starting to get downright "frigid". We had a night in the 40s (f as opposed to c). Lots of people were lighting up their fireplaces because apparently central heat is not a thing Floridians generally worry about until they need it.

    I'd ask you to feel sorry for them, but I daresay I saw some grab the pork chop launcher a minute ago, so I'm going to run away now. @=)

    Aren't you in Florida? If so, that's definitely cold for you.

    I'm in Florida, but I'm from the Midwest. If my mom caught me complaining about 40 degree weather at night in mid-November, she'd smack me. She also hates it when I call her on Thanksgiving and tell her I'm wearing shorts. @=)

    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.

  • GilaMonster (11/17/2015)


    The heatwave here has just broken, yesterday was the first rain for almost a month and a half (in our peak rainfall season). It's been seriously unpleasant here since early October.

    Yikes. I hope it cools off for quite a while. Do you have specific dry / rainy seasons where you're at or was this unseasonable?

    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.

  • Brandie Tarvin (11/17/2015)


    GilaMonster (11/17/2015)


    The heatwave here has just broken, yesterday was the first rain for almost a month and a half (in our peak rainfall season). It's been seriously unpleasant here since early October.

    Yikes. I hope it cools off for quite a while. Do you have specific dry / rainy seasons where you're at or was this unseasonable?

    This is our rainfall season, Sept/Oct to March/April, mid summer, peak rainfall.

    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
  • Brandie Tarvin (11/17/2015)


    Ed Wagner (11/17/2015)


    Brandie Tarvin (11/17/2015)


    Ed Wagner (11/17/2015)


    Lynn Pettis (11/16/2015)


    Ed Wagner (11/16/2015)


    Lynn Pettis (11/16/2015)


    And then you this type of question:

    ************(11/16/2015)


    How can i round off decimal number. E.g if i have 7.9---i need to round it off to 8, if i have 7.4---i need to round it off to 7...i tried round, ceiling.. but nothing got worked... please suggest

    I gave it a shot. We'll see if the shiny thing in my office is the crystal ball making an appearance or merely the sun beckoning me to go outside.

    At least you have sunshine. Looks like snowy weather is coming here for here.

    I saw that major snowstorm, but it looked like the brunt of hit was going to hit east of you. How did it turn out?

    I think our turn is coming here soon enough. Yesterday was in the 60s and this weekend we're supposed to struggle to get up to 40 and see the first snow of the year. The timing is about right.

    According to most of the people in this area, it's starting to get downright "frigid". We had a night in the 40s (f as opposed to c). Lots of people were lighting up their fireplaces because apparently central heat is not a thing Floridians generally worry about until they need it.

    I'd ask you to feel sorry for them, but I daresay I saw some grab the pork chop launcher a minute ago, so I'm going to run away now. @=)

    Aren't you in Florida? If so, that's definitely cold for you.

    I'm in Florida, but I'm from the Midwest. If my mom caught me complaining about 40 degree weather at night in mid-November, she'd smack me. She also hates it when I call her on Thanksgiving and tell her I'm wearing shorts. @=)

    If the Chicago weather keeps up as it has it will be in the 50s on Thanksgiving, which, as you know, in the Midwest is shorts weather.

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • Brandie Tarvin (11/17/2015)


    ChrisM@Work (11/17/2015)


    Brandie Tarvin (11/16/2015)


    Lynn Pettis (11/16/2015)


    Blur

    Blur

    Blur

    The safety word is DBCC TIMEWARP(). @=)

    Huh?

    โ€œWrite the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.โ€ - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden

  • I love it when I'm poking through topics that sound interesting, and come across something I've not done / seen before. Which then leads me down a rabbit hole to figure out (sometimes) *how* to do the thing in the topic...

    Case in point:

    How to do a PIVOT led me down the rabbit hole of how to do a crosstab instead of a pivot...

    So I converted a query I had, that was using PIVOT, to a crosstab. No performance gains (it's just a different way for me to check and display last backups for all my DBs, so not a lot of data,) but in some ways it's an easier to read query...

    So, to paraphrase Neo "The One:" "I know crosstabs"

    :hehe:

  • Ed Wagner (11/16/2015)


    WayneS (11/16/2015)


    Lynn Pettis (11/13/2015)


    (think government contracted software development).

    My scary story when working with the gov't.

    Software contract awarded, specified that all data access has to go through stored procedures.

    They sent to me for my approval:

    CREATE PROCEDURE xyz (

    @ColumnList varchar(max),

    @From varchar(max),

    @Where varchar(max),

    @Order varchar(max)

    )

    AS

    declare @command varchar(max);

    SET @command = 'SELECT ' + @ColumnList + ' FROM ' + @From;

    IF @Where > '' SET @command = @command + ' WHERE ' + @Where;

    IF @Order > '' SET @command = @command + ' ORDER BY ' + @Order;

    EXECUTE (@command);

    GO

    Yep, that was the only procedure in the application.

    They quickly learned to hate me.

    That would be extraordinarily funny if it weren't true. Unfortunately, I have this feeling that you aren't joking.

    Nope, not joking at all.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • jasona.work (11/17/2015)


    I love it when I'm poking through topics that sound interesting, and come across something I've not done / seen before. Which then leads me down a rabbit hole to figure out (sometimes) *how* to do the thing in the topic...

    Case in point:

    How to do a PIVOT led me down the rabbit hole of how to do a crosstab instead of a pivot...

    So I converted a query I had, that was using PIVOT, to a crosstab. No performance gains (it's just a different way for me to check and display last backups for all my DBs, so not a lot of data,) but in some ways it's an easier to read query...

    So, to paraphrase Neo "The One:" "I know crosstabs"

    :hehe:

    "It Depends". There's usually an minor performance gain in using CROSSTABs over PIVOTs but it's so small on today's machines, it's nearly trivial... unless... if the CROSSTAB or PIVOT is truly an aggregation, then pre-aggregation will help a whole lot and CROSSTAB (in such a case) will we roughly twice as fast at PIVOT.

    For more information and some test code, please see the following article.

    http://www.sqlservercentral.com/articles/T-SQL/63681/

    As a personal preference, I prefer CROSSTABs rather than PIVOTs just from a readability point of view.

    I also wouldn't call learning something new a "rabbit hole" no matter how cleverly disguised nor how deep the hole may be. ๐Ÿ˜€

    --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)

Viewing 15 posts - 51,451 through 51,465 (of 66,712 total)

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