5

Saw the following SQL in an SP at work:

Type_ID = CASE Product.Type_ID
WHEN 1 THEN 1
WHEN 2 THEN 1
WHEN 3 THEN 2
WHEN 4 THEN 3
END

Seems a little bit redundant to me :-)...

Comments
  • 0
    I think I am getting dyslexia lately, when I first read the code and posted it, I was sure it said:

    WHEN 1 THEN 1
    WHEN 2 THEN 2
    WHEN 3 THEN 3
    WHEN 4 THEN 4

    Just now I realized that it did not say that, at least it had some use...
Add Comment