Forum Replies Created

Viewing 15 posts - 6,316 through 6,330 (of 8,731 total)

  • RE: how can i calculate the two columns

    Could you post the whole query and the exact error you get?

    Even better would be to have DDL (table definition) and sample data.

    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: Interview Questions

    kimberly_lehman (6/6/2014)


    You could potentially miss out on some great employees if you let your ego get in the way of making an objective hiring decision. I've been working with T-SQL...

    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: Just curious, what are your SQL pet peeves ?

    thomashohner (6/5/2014)


    But how would you alias those continents?:hehe::hehe:

    ***Just Kidding

    I could alias them and join them. 😀

    SELECT *

    FROM NorthAmerica na

    JOIN SouthAmerica sa ON na.PanamaSouthBorder = sa.ColombiaNorthBorder

    JOIN Europe ...

    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: Just curious, what are your SQL pet peeves ?

    Sean Lange (6/5/2014)


    Luis Cazares (6/5/2014)


    As most things, it depends.

    According to my education, America is a single continent divided in four regions: North, Central, South and Caribbean. According to the US...

    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: Just curious, what are your SQL pet peeves ?

    As most things, it depends.

    According to my education, America is a single continent divided in four regions: North, Central, South and Caribbean. According to the US education, North America and...

    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: Just curious, what are your SQL pet peeves ?

    Sean Lange (6/5/2014)


    SQLRNNR (6/5/2014)


    Luis Cazares (6/5/2014)


    TomThomson (6/5/2014)


    Luis Cazares (6/5/2014)


    Koen Verbeeck (6/5/2014)


    SQL is delicious (6/5/2014)


    ...also labors under the delusion that the American education system is worthless and that our master's level...

    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: Strange situation for result

    What's wrong with the code?

    It's updating one row. What's missing?

    CREATE TABLE numbers(

    [Zvans no] nvarchar(255),

    [Zvans uz] nvarchar(255),

    oper int)

    INSERT INTO numbers([Zvans no],[Zvans uz]) SELECT

    '20233176','20263309' UNION ALL SELECT

    '20233176','22843223' UNION ALL SELECT

    '20233176','25432616' UNION ALL...

    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: Just curious, what are your SQL pet peeves ?

    TomThomson (6/5/2014)


    Luis Cazares (6/5/2014)


    Koen Verbeeck (6/5/2014)


    SQL is delicious (6/5/2014)


    ...also labors under the delusion that the American education system is worthless and that our master's level work is the equivalent of...

    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: Help with the count function

    I couldn't get the results with the sample data that you posted, but this should be what you're looking for.

    SELECT COUNT(qc.QualityID) AS TotalCount,

    q.Qualitydesc

    FROM Quality q

    LEFT

    JOIN...

    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: Just curious, what are your SQL pet peeves ?

    Koen Verbeeck (6/5/2014)


    SQL is delicious (6/5/2014)


    ...also labors under the delusion that the American education system is worthless and that our master's level work is the equivalent of junior high/early high...

    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: WITH(NOLUCK)

    Grant Fritchey (6/5/2014)


    Jason Strate has a great example that shows the effects of NOLOCK.

    But, one little thing, just on the side, why write code where you put NOLOCK everywhere. If...

    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: Problem with outer CASE statement

    You might have a lot of additional and unneeded code. 😉

    However, I'm only guessing.

    SELECTi.ItemID AS ID,

    i.ItemName AS Name,

    ss.SupplyStatus AS CurrentStatus,

    CAST(SUM (

    CASE AdjustmentTypeID

    WHEN 1 THEN VolumeOrNumber

    WHEN 2 THEN VolumeOrNumber...

    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: Problem with outer CASE statement

    What's the problem?

    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 and group by

    pietlinden (6/5/2014)


    It looks like this works:

    As long as you don't have a 2 on Answer column.

    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: WITH(NOLUCK)

    Most of the time, people believe that it won't happen to them.

    In our case we could get some people to stop using them when we demonstrated that we were missing...

    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 - 6,316 through 6,330 (of 8,731 total)