Are the posted questions getting worse?

  • ChrisM@Work (6/24/2016)


    I've heard that the EU now has 1GB of free space.

    Groan!!! But still pretty funny!!!

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • Ugh....just needing to share this unbelievably ridiculous mess I just stumbled across.

    create view [dbo].[getNewID] as select newid() as new_id;

    Really? A view to get a guid???

    But wait...it gets even better.

    ALTER function [dbo].[GUID_CREATE]() RETURNS UNIQUEIDENTIFIER

    AS

    BEGIN

    RETURN (select new_id from getNewID);

    END;

    With that I shall end my Friday and start my week of vacation. See y'all after July 4th.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • Sean Lange (6/24/2016)


    Ugh....just needing to share this unbelievably ridiculous mess I just stumbled across.

    create view [dbo].[getNewID] as select newid() as new_id;

    Really? A view to get a guid???

    But wait...it gets even better.

    ALTER function [dbo].[GUID_CREATE]() RETURNS UNIQUEIDENTIFIER

    AS

    BEGIN

    RETURN (select new_id from getNewID);

    END;

    With that I shall end my Friday and start my week of vacation. See y'all after July 4th.

    It's not as ridiculous as it may seem. It allows for simple function calls within other views that may be used to more easily generate random data, especially inside an iTVF.

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

  • Sean Lange (6/24/2016)


    Ugh....just needing to share this unbelievably ridiculous mess I just stumbled across.

    create view [dbo].[getNewID] as select newid() as new_id;

    Really? A view to get a guid???

    But wait...it gets even better.

    ALTER function [dbo].[GUID_CREATE]() RETURNS UNIQUEIDENTIFIER

    AS

    BEGIN

    RETURN (select new_id from getNewID);

    END;

    With that I shall end my Friday and start my week of vacation. See y'all after July 4th.

    I'm sure I've seen that code before. Can't remember if it was for a valid reason or not.

    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
  • Luis Cazares (6/24/2016)


    Sean Lange (6/24/2016)


    Ugh....just needing to share this unbelievably ridiculous mess I just stumbled across.

    create view [dbo].[getNewID] as select newid() as new_id;

    Really? A view to get a guid???

    But wait...it gets even better.

    ALTER function [dbo].[GUID_CREATE]() RETURNS UNIQUEIDENTIFIER

    AS

    BEGIN

    RETURN (select new_id from getNewID);

    END;

    With that I shall end my Friday and start my week of vacation. See y'all after July 4th.

    I'm sure I've seen that code before. Can't remember if it was for a valid reason or not.

    See my previous post.

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

  • Eirikur Eiriksson (6/24/2016)


    jasona.work (6/24/2016)


    ChrisM@Work (6/24/2016)


    Eirikur Eiriksson (6/24/2016)


    Luis Cazares (6/24/2016)


    I'm sorry, is there any country that can give me good news? It seems that Mexico, US and UK are full of negative news and I'm getting grumpy and sarcastic (more than usual).

    Nothing but happy news from Iceland these days 😀

    😎

    HEY YOU GUYS! ^^

    I FOUND AN ISLAND!!

    Yeah, but Iceland?

    I mean, I'm sure it's a nice place and all, if you can deal with the occasional volcano, but I was thinking someplace where you could loaf around all day in a Speedo, year-round...

    :hehe:

    Not the whole year in Speedo, more like 1-2 days a year

    😎

    I'm voting for Iceland, I'm not sure that I want to see everyone in a Speedo all year long.

    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
  • Jeff Moden (6/24/2016)


    Luis Cazares (6/24/2016)


    Sean Lange (6/24/2016)


    Ugh....just needing to share this unbelievably ridiculous mess I just stumbled across.

    create view [dbo].[getNewID] as select newid() as new_id;

    Really? A view to get a guid???

    But wait...it gets even better.

    ALTER function [dbo].[GUID_CREATE]() RETURNS UNIQUEIDENTIFIER

    AS

    BEGIN

    RETURN (select new_id from getNewID);

    END;

    With that I shall end my Friday and start my week of vacation. See y'all after July 4th.

    I'm sure I've seen that code before. Can't remember if it was for a valid reason or not.

    See my previous post.

    You can see an example of this on my currently inactive blog.

  • I'm not sure I can beat that one for redundundundancy, but I'm reading through a client app written in COBOL that apparently does a call to the database to get the value of getdate(). It also does db calls to get a new GUID generated.

    Cheers.

    Luis Cazares (6/24/2016)


    Sean Lange (6/24/2016)


    Ugh....just needing to share this unbelievably ridiculous mess I just stumbled across.

    create view [dbo].[getNewID] as select newid() as new_id;

    Really? A view to get a guid???

    But wait...it gets even better.

    ALTER function [dbo].[GUID_CREATE]() RETURNS UNIQUEIDENTIFIER

    AS

    BEGIN

    RETURN (select new_id from getNewID);

    END;

    With that I shall end my Friday and start my week of vacation. See y'all after July 4th.

    I'm sure I've seen that code before. Can't remember if it was for a valid reason or not.

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • I would also like to apply for citizenship to the island.

    Be sure it has coconut palms. I think the Professor on Gilligan's Island had a way to generate electricity from coconuts.

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • Jeff Moden (6/24/2016)


    Sean Lange (6/24/2016)


    Ugh....just needing to share this unbelievably ridiculous mess I just stumbled across.

    create view [dbo].[getNewID] as select newid() as new_id;

    Really? A view to get a guid???

    But wait...it gets even better.

    ALTER function [dbo].[GUID_CREATE]() RETURNS UNIQUEIDENTIFIER

    AS

    BEGIN

    RETURN (select new_id from getNewID);

    END;

    With that I shall end my Friday and start my week of vacation. See y'all after July 4th.

    It's not as ridiculous as it may seem. It allows for simple function calls within other views that may be used to more easily generate random data, especially inside an iTVF.

    I will go check out Lynn's blog but really??? A scalar function that calls a view that is nothing more than a scalar function itself? I can't even begin to fathom how or why that makes any sense at all.

    In context of where it was used it makes even less sense but that is another topic entirely. It was used inside a cursor that is in a stored proc that is called from a trigger. Yes you read that correctly. A trigger has a cursor and each iteration calls a stored proc which in turn selects this column from the view which in turn calls a scalar function. The whole damn thing could have been replace with a single select statement. You gotta love third party applications.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • Sean Lange (6/24/2016)


    Jeff Moden (6/24/2016)


    Sean Lange (6/24/2016)


    Ugh....just needing to share this unbelievably ridiculous mess I just stumbled across.

    create view [dbo].[getNewID] as select newid() as new_id;

    Really? A view to get a guid???

    But wait...it gets even better.

    ALTER function [dbo].[GUID_CREATE]() RETURNS UNIQUEIDENTIFIER

    AS

    BEGIN

    RETURN (select new_id from getNewID);

    END;

    With that I shall end my Friday and start my week of vacation. See y'all after July 4th.

    It's not as ridiculous as it may seem. It allows for simple function calls within other views that may be used to more easily generate random data, especially inside an iTVF.

    I will go check out Lynn's blog but really??? A scalar function that calls a view that is nothing more than a scalar function itself? I can't even begin to fathom how or why that makes any sense at all.

    In context of where it was used it makes even less sense but that is another topic entirely. It was used inside a cursor that is in a stored proc that is called from a trigger. Yes you read that correctly. A trigger has a cursor and each iteration calls a stored proc which in turn selects this column from the view which in turn calls a scalar function. The whole damn thing could have been replace with a single select statement. You gotta love third party applications.

    Yes, I did that back in 2009. I think that is before I learned more about iTVF's. I should be able to convert the function on my blog to an iTVF fairly easily. I need something like it to generate test data for a special character removal process I need to develop.

  • Lynn Pettis (6/24/2016)


    Sean Lange (6/24/2016)


    Jeff Moden (6/24/2016)


    Sean Lange (6/24/2016)


    Ugh....just needing to share this unbelievably ridiculous mess I just stumbled across.

    create view [dbo].[getNewID] as select newid() as new_id;

    Really? A view to get a guid???

    But wait...it gets even better.

    ALTER function [dbo].[GUID_CREATE]() RETURNS UNIQUEIDENTIFIER

    AS

    BEGIN

    RETURN (select new_id from getNewID);

    END;

    With that I shall end my Friday and start my week of vacation. See y'all after July 4th.

    It's not as ridiculous as it may seem. It allows for simple function calls within other views that may be used to more easily generate random data, especially inside an iTVF.

    I will go check out Lynn's blog but really??? A scalar function that calls a view that is nothing more than a scalar function itself? I can't even begin to fathom how or why that makes any sense at all.

    In context of where it was used it makes even less sense but that is another topic entirely. It was used inside a cursor that is in a stored proc that is called from a trigger. Yes you read that correctly. A trigger has a cursor and each iteration calls a stored proc which in turn selects this column from the view which in turn calls a scalar function. The whole damn thing could have been replace with a single select statement. You gotta love third party applications.

    Yes, I did that back in 2009. I think that is before I learned more about iTVF's. I should be able to convert the function on my blog to an iTVF fairly easily. I need something like it to generate test data for a special character removal process I need to develop.

    I did find your post and in context of the time and what you were using it for it makes sense. The situation I ran into however...:w00t::w00t::w00t:

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • Luis Cazares (6/24/2016)


    Eirikur Eiriksson (6/24/2016)


    jasona.work (6/24/2016)


    ChrisM@Work (6/24/2016)


    Eirikur Eiriksson (6/24/2016)


    Luis Cazares (6/24/2016)


    I'm sorry, is there any country that can give me good news? It seems that Mexico, US and UK are full of negative news and I'm getting grumpy and sarcastic (more than usual).

    Nothing but happy news from Iceland these days 😀

    😎

    HEY YOU GUYS! ^^

    I FOUND AN ISLAND!!

    Yeah, but Iceland?

    I mean, I'm sure it's a nice place and all, if you can deal with the occasional volcano, but I was thinking someplace where you could loaf around all day in a Speedo, year-round...

    :hehe:

    Not the whole year in Speedo, more like 1-2 days a year

    😎

    I'm voting for Iceland, I'm not sure that I want to see everyone in a Speedo all year long.

    Rest assured, I do not own one and won't be buying one any time soon. The island, however, is sounding better and better.

  • Ed Wagner (6/22/2016)


    jasona.work (6/22/2016)


    TomThomson (6/22/2016)


    jasona.work (6/22/2016)


    /me leans back, marveling at what happens when you toss a crystal into a supersaturated solution...

    Sounds like the next couple weeks / months are going to be interesting, regardless of the outcome of the vote.

    Also sounds like the same things are true all over...

    * Politicians aren't worth their weight in garbage

    * Voters (in general) are id10ts and will vote for whoever yells loudest / promises them what they think they want

    * Water is wet

    :hehe:

    You got the third one wrong :hehe:. Water is only wet when it's warm enough - try it at -40 degrees and see if it's wet or not.

    Geez, next you're going to tell me that depending on the garbage, it might be worth less than a politician...

    :hehe:

    That means the politician's value would be greater than the garbage. 😉

    Surely not? Usually a politician is worth more at -40 degrees than at higher temperatures (not always, as he might be wearing adequate protective clothing and heating aparatus, or at higher temperatures he might be unable to speak for one reason or another) but even at -40 he (or she) is usually not as valuable as his (or her) weight in garbage.

    Tom

  • TomThomson (6/24/2016)


    Ed Wagner (6/22/2016)


    jasona.work (6/22/2016)


    TomThomson (6/22/2016)


    jasona.work (6/22/2016)


    /me leans back, marveling at what happens when you toss a crystal into a supersaturated solution...

    Sounds like the next couple weeks / months are going to be interesting, regardless of the outcome of the vote.

    Also sounds like the same things are true all over...

    * Politicians aren't worth their weight in garbage

    * Voters (in general) are id10ts and will vote for whoever yells loudest / promises them what they think they want

    * Water is wet

    :hehe:

    You got the third one wrong :hehe:. Water is only wet when it's warm enough - try it at -40 degrees and see if it's wet or not.

    Geez, next you're going to tell me that depending on the garbage, it might be worth less than a politician...

    :hehe:

    That means the politician's value would be greater than the garbage. 😉

    Surely not? Usually a politician is worth more at -40 degrees than at higher temperatures (not always, as he might be wearing adequate protective clothing and heating aparatus, or at higher temperatures he might be unable to speak for one reason or another) but even at -40 he (or she) is usually not as valuable as his (or her) weight in garbage.

    If we took the adequate protective clothing and heating apparatus and pawned them, they might exceed the value of the garbage ... AND we would increase the value of the politician at -40.

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

Viewing 15 posts - 54,751 through 54,765 (of 66,712 total)

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