Forum Replies Created

Viewing 15 posts - 2,176 through 2,190 (of 8,731 total)

  • RE: Are the posted questions getting worse?

    Sean Lange (9/9/2016)


    The Dixie Flatline (9/9/2016)


    I have been making bacon like that for years...never knew it had a name. Another great way is to put a liberal amount...

    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
  • RE: Split string in two or three columns based on character count

    Another option.

    Note that I'm including 2 additional possibilities to show a problem. The other 2 solutions handle it differently, but not necessarily correctly.

    SELECT Symbol,

    LEFT(Symbol, CHARINDEX('_',...

    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
  • RE: Split string in two or three columns based on character count

    oaucamp (9/9/2016)


    Hi All

    I have a table that contains one column called Symbol. The symbol consists of two or three parts. They are ticker, indicator and dimension or in some cases...

    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
  • RE: Small rounding

    Matjaz Urank (9/9/2016)


    .. and SELECT ROUND( 7.0/10, 0) = 1

    I can't understand why technically this could be an error. But that doesn't mean that this isn't a bug. Does Microsoft...

    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
  • RE: Is Division by Zero NULL?

    Creating a scalar UDF to handle division by zero is a bad idea. It will only slow down queries.

    What's the problem with using NULLIF?

    SELECT numerator / NULLIF( denominator, 0)

    You can...

    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
  • RE: SQL view performance problem

    There's no way anyone can help you from what you posted. You'll need to follow the indications in this article to get actual help: http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

    It's not that we don't want...

    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
  • RE: SQL Code QA

    Jason A. Long (9/7/2016)


    Speaking for all the jerk code reviewers of the world... Yes, formatting counts, yes I'll give you crap over it (when you have to read through...

    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
  • RE: REPLACE or alternative?

    Maybe something like this:

    CASE Orders.ptemp

    WHEN 'P' THEN 'Permanent'

    WHEN 'T' THEN 'Temporary'

    WHEN 'B' THEN 'Both'

    WHEN...

    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
  • RE: Queries and joins with different locations.

    This is the closes I could get to your expected results. I have to agree with Grant, the design is incorrect.

    WITH CTE AS(

    SELECT OrderNumber, Location, Total...

    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
  • RE: SQL Code QA

    colin.dunn (9/7/2016)


    Put the join ON clauses on the same line since they were so short.

    I usually have my ON clauses on the same line as my JOIN, but when he...

    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
  • RE: Today's Random Word!

    Grumpy DBA (9/7/2016)


    Ed Wagner (9/7/2016)


    Preserve

    Marmalade

    Lady

    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
  • RE: SQL Code QA

    You should also use column alias in your ORDER BY clause instead of position.

    ORDER BY [Work Type] DESC, [Days Elapsed];

    EDIT:

    Also here are some additional comments

    SELECT --Use the actual length...

    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
  • RE: Today's Random Word!

    Ed Wagner (9/6/2016)


    Revenant (9/6/2016)


    Y.B. (9/6/2016)


    whereisSQL? (9/6/2016)


    Hugo Kornelis (9/6/2016)


    Ray K (9/6/2016)


    Ed Wagner (9/6/2016)


    djj (9/6/2016)


    Ed Wagner (9/6/2016)


    Hugo Kornelis (9/6/2016)


    Stuart Davies (9/6/2016)


    BWFC (9/6/2016)


    TomThomson (9/6/2016)


    Revenant (9/5/2016)


    Treat

    Trick

    Cheap

    Canary

    Wharf

    Worf

    Data

    Riker

    Island

    Beach

    Volleyball

    Top Gun

    Tomcat

    Warthog

    meerkat

    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
  • RE: Case Statement Help

    I believe that you're missing some parenthesis and you might need to change one of the conditions to allow the last part to be evaluated.

    Update Staging

    Set P_Staged_By = CASE

    WHEN P_Staged_By...

    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
  • RE: Are the posted questions getting worse?

    Sean Lange (9/6/2016)


    I tried my hand at curing my own bacon for the first time. It came out of the cure Saturday morning and hit the smoker later on Saturday....

    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

Viewing 15 posts - 2,176 through 2,190 (of 8,731 total)