Are the posted questions getting worse?

  • Sergiy - Thursday, September 13, 2018 10:56 PM

    It's eqally true about pretty much every new feature in SQL Server introduces since 2005.
    They all are meant to make life easier for those who are not good with relational databases, paving the way for most horrible database solutions.
    P.S.
    When I saw "IIF" function I  knew - it's the final nail onto the coffin of SQL Server.

    Heh.... nah... Microsoft is cutting new nails all the time for the same purpose.  I wish they'd go back and fix some of the old ones like the atrocity known as PIVOT, FORMAT, Partitioned Tables, Recursive CTEs, etc, etc, and, of course, the newer temporal functions.  SQL Server is looking more and more like the following product. 😀

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

  • DinoRS - Friday, September 14, 2018 5:39 AM

    Sergiy - Thursday, September 13, 2018 10:56 PM

    It's eqally true about pretty much every new feature in SQL Server introduces since 2005.
    They all are meant to make life easier for those who are not good with relational databases, paving the way for most horrible database solutions.
    P.S.
    When I saw "IIF" function I  knew - it's the final nail onto the coffin of SQL Server.

    I agree, we should all default to REVERSE STRING RIGHT again, and before I could carry on to rant about this, I'll leave it as it stands. Probably you have never seen any use for geospatial data either.

    At least then the horrible code would be obvious. 😉

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

  • Sergiy - Friday, September 14, 2018 7:46 AM

    Name it.

    No Problem, some companies actually do track flights of their most valuable Managers to be able to determine how much actual delay they've encountered with which Airline to be able to decide wether to use for some "emergency flight" private rented aircraft or go Business / First with <Preferred Airline for Route>. Another use case is to track seismic activities from Sensor node in order to be able to determine how far the earthquake was actually shaking ground so Insurance Companies can determine wether certain claims might be feasible or not at all.

    Now please enlighten me why I'd want something like LEFT removed again, but please try hard - I really dislike engaging my BSF (Bullshit Filter) just because some old lad from apparently pre Millenium age doesn't like ALL changes MS has made to MSSQL - I'm not arguing that there are tons of things I wouldn't use but "everything past 2005 is crap" is plain flat and simple bullshit.

  • Sergiy - Friday, September 14, 2018 7:46 AM

    Name it.

    Insurance company I used to work for LOVED geospatial data. "Now where is that factory you want us to insure? Huh... that's a 50 year flood plain, here's the bill." Tons of uses for spatial there.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Jeff Moden - Thursday, September 13, 2018 8:09 PM

    Heh... must be one of those people that think that "Just because you can do something in SQL Server, doesn't mean you should". :D:D:D

    It gets worse.  The primary key is three fields and all of the queries are doing a TOP 1 on just the first two fields of the primary key with no ORDER BY clause.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • Jeff Moden - Thursday, September 13, 2018 8:09 PM

    Heh... must be one of those people that think that "Just because you can do something in SQL Server, doesn't mean you should". :D:D:D

    This sounds like one of those people who say they have 30 years experience, when what they really have is 3 months experience 120 times in a row.
    I wish I could say that I've never seen it before, but that would be a lie.  I'm sure we've all seen it more times than we'd like.

  • DinoRS - Friday, September 14, 2018 8:26 AM

    Sergiy - Friday, September 14, 2018 7:46 AM

    Name it.

    No Problem, some companies actually do track flights of their most valuable Managers to be able to determine how much actual delay they've encountered with which Airline to be able to decide wether to use for some "emergency flight" private rented aircraft or go Business / First with <Preferred Airline for Route>. Another use case is to track seismic activities from Sensor node in order to be able to determine how far the earthquake was actually shaking ground so Insurance Companies can determine wether certain claims might be feasible or not at all.

    Now please enlighten me why I'd want something like LEFT removed again, but please try hard - I really dislike engaging my BSF (Bullshit Filter) just because some old lad from apparently pre Millenium age doesn't like ALL changes MS has made to MSSQL - I'm not arguing that there are tons of things I wouldn't use but "everything past 2005 is crap" is plain flat and simple bullshit.

    For the flights I can see the use case for airlines schedules and airport access times, but I  cannot see how geospatial data may be in use here.
    Reports based on geospatial data could only provide some very approximate estimations, not good for any responsible decision making.
    Sorry, you failed to provide a proper use case here.

    About seismic activities - the geospatial data as it's introduced in SQL Server is not sufficient here.
    Have a look at the maps of 2 earthquakes I happened to witness:

    https://en.wikipedia.org/wiki/1977_Vrancea_earthquake
    https://en.wikipedia.org/wiki/1990_Vrancea_earthquakes#/media/File:1990_RO_quake.jpg

    The areas of the quakes intensity are not circular.
    Bucuresti is further away from the epicenter of 1977 earthquake than Laza, but Bucuresti got 2 levels stronger hit than Laza.
    Obviously, geospatial data would provide misleading report for an insurance company, if there would one in Romania at the time.
    It takes much more than some geogrphical coordinates to estimate an earthquake impact on any particular location. It must take into cinsideration tectonic structure of the area, density of the layers been shaken, depth of the the epicenter, presence of cracks, etc.

    Some of the factors we a still able to discover after earthquakes, like 2 fault lines were discovered after the recent earthquakes in Christshurch, NZ.

    And if any insurance company anywhere in the world would reject a claim from a customer on a basis of its geographical distance from the epicenter of an earthquake it could potentially face pretty serious legal consequences. It would be highly unprofessional of them to base their judgement on some geospatial data.
    So, this use case is lame too.

    Do you have any other?

    And don't worry about the LEFT function.
    I can assure you - I used it in SQL 2000, So it's not in danger in any way.
    You better review your BSF  settings - may be you's benefit from applying it to yourself.

    _____________
    Code for TallyGenerator

  • Grant Fritchey - Friday, September 14, 2018 8:36 AM

    Insurance company I used to work for LOVED geospatial data. "Now where is that factory you want us to insure? Huh... that's a 50 year flood plain, here's the bill." Tons of uses for spatial there.

    How do they know about "50 year flood plain".
    50 year
    flood
    plain
    It does not sound like geospatial data.

    _____________
    Code for TallyGenerator

  • DinoRS - Friday, September 14, 2018 8:26 AM

    Sergiy - Friday, September 14, 2018 7:46 AM

    Name it.

    No Problem, some companies actually do track flights of their most valuable Managers to be able to determine how much actual delay they've encountered with which Airline to be able to decide wether to use for some "emergency flight" private rented aircraft or go Business / First with <Preferred Airline for Route>. Another use case is to track seismic activities from Sensor node in order to be able to determine how far the earthquake was actually shaking ground so Insurance Companies can determine wether certain claims might be feasible or not at all.

    Now please enlighten me why I'd want something like LEFT removed again, but please try hard - I really dislike engaging my BSF (Bullshit Filter) just because some old lad from apparently pre Millenium age doesn't like ALL changes MS has made to MSSQL - I'm not arguing that there are tons of things I wouldn't use but "everything past 2005 is crap" is plain flat and simple bullshit.

    I have to ask what Geospatial data has to with IIF or LEFT and what IIF has to do with LEFT or REVERSE with a substring, which is what started all of this.

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

  • Jeff Moden - Thursday, September 13, 2018 6:50 AM

    Like anything else, GOTO can certainly be abused but, like anything else, it does have its uses.

    That tends to depend on the langage.  There is no use whatever for GOTO in anguages like Haskell, Hope, Miranda, Parlog, Prolog, and many more - indeed I have never come across any declarative language that has a GOTO statement (and I'm thoroughly fed up with hearing or seeing "T-SQL or PL-SQL or equivalent for some other RDBMS is a declarative language" when quite clearly none of them is.
    SQL can often be used in non-declarative languages to eliminate a lot of code repetition and to cope with a shortage of structured flow-contol statements.  But even in an essentially non-declarative language there may be no use for GOTO if the language is well designed.

    Tom

  • TomThomson - Sunday, September 16, 2018 4:47 AM

    That tends to depend on the langage.  There is no use whatever for GOTO in anguages like Haskell, Hope, Miranda, Parlog, Prolog, and many more - indeed I have never come across any declarative language that has a GOTO statement (and I'm thoroughly fed up with hearing or seeing "T-SQL or PL-SQL or equivalent for some other RDBMS is a declarative language" when quite clearly none of them is.
    SQL can often be used in non-declarative languages to eliminate a lot of code repetition and to cope with a shortage of structured flow-contol statements.  But even in an essentially non-declarative language there may be no use for GOTO if the language is well designed.

    Heh... agreed on the "declarative" issue but people get all frothy and puffed up when I say that SQL Server boils down to essentially being a symbolic macro language that basically works with a file system like any other program might (B-Tree notwithstanding).  Open or grab an existing connection to the file, find a row, read the row, do something with the row, loop until done, close the connection or let someone else use the connection.  In the case of SQL Server, it finds a page and reads a row from it but that's not much different than reading from a file in DOS where a whole sector may be read from the disk.  The big thing is that it has taken the pain away by making it so that we don't have to write loops anymore... it does all that behind the scenes.

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

  • Jeff Moden - Sunday, September 16, 2018 9:11 AM

    Heh... agreed on the "declarative" issue but people get all frothy and puffed up when I say that SQL Server boils down to essentially being a symbolic macro language that basically works with a file system like any other program might (B-Tree notwithstanding).  Open or grab an existing connection to the file, find a row, read the row, do something with the row, loop until done, close the connection or let someone else use the connection.  In the case of SQL Server, it finds a page and reads a row from it but that's not much different than reading from a file in DOS where a whole sector may be read from the disk.  The big thing is that it has taken the pain away by making it so that we don't have to write loops anymore... it does all that behind the scenes.

    Abstracted declarative or inventive utilization?
    😎

    There are several areas where SQL/T-SQL and now U-SQL are lagging behind. room for improvement, mainly on the dev-ops side, the current bolt-on is reaching the end of the cursor/loop.

  • Jeff Moden - Thursday, September 13, 2018 1:12 PM

    ZZartin - Thursday, September 13, 2018 12:10 PM

    The biggest problem i see people doing with TRY/CATCH and this isn't just in SQL Server is that people use it to do exactly what the guy in that post was doing.  No attempt at pre parsing or correcting errors, just throw a bunch of stuff into it and see if it sticks.  Which isn't so much an issue with TRY/CATCH itself, used properly it's very powerful and useful, it just enables some very lazy design practices.

    Agreed.  That's a major part of the "abuse" of TRY/CATCH I've seen.

    For a careful, meticulous, competent writer of code try-catch is a very effective tool with which to develop better code while for a carless, sloppy, lazy writer of code it is an opportunity to be even more careless and sloppy than he was before it was available, That's true whatever language they are writing in. Given that a developer of the sloopy kind has either never heard of error mangement or has heard of it and decided isn't his problem try-catch will probably be treated as a nice simple method of throwing as much as is possible of the diagnostics for errors that are caught, so that they won't be quickly traced back to their source.

    Tom

  • Grant Fritchey - Friday, September 14, 2018 8:36 AM

    Sergiy - Friday, September 14, 2018 7:46 AM

    Name it.

    Insurance company I used to work for LOVED geospatial data. "Now where is that factory you want us to insure? Huh... that's a 50 year flood plain, here's the bill." Tons of uses for spatial there.

    Ha, other than "ooh, look at the pretty colors!", ours usually devolve into "yep, all the members DO live in the three major cities in the state. Imagine that"

    Gets a lot better when people remember to look for rates per thousand members
    *Edit - actually, it does make for an easy quality check of address data, when you suddenly realize that the data shows members in Iceland when we're strictly a U.S. system.

    -------------------------------------------------------------------------------------------------------------------------------------
    Please follow Best Practices For Posting On Forums to receive quicker and higher quality responses

  • I'm beginning to think that stupidity is contagious... Been dealing with our Vendor Support Team for the last 2 weeks (things were so bad we were in a system down situation almost all last week), and some of the responses I have been getting have been concerning and questionable; from stating that something was "successful" when the output stated the process completed with errors, and that the reason a file is missing on a Black Box Linux Server is because our SQl Server has Optimise for Ad Hoc Workloads switched off.

    Problem is, it's been so bad I've caught myself 3 times today saying something questionably stupid and had it also pointed out to me twice that I have been completely missing the obvious (like font size 48 and bold obvious)... It's only Monday. :crying: Maybe time for a few days off so I don't embarrass myself further. :/

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

Viewing 15 posts - 62,236 through 62,250 (of 66,712 total)

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