Replace SQL String for stock levels

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • moon92
    New Member
    • May 2015
    • 1

    Replace SQL String for stock levels

    I am wanting to replace "in stock", "low stock" and "out of stock" with Values of "20" , "2" and "0" my software only allows me to do one expression at a time. I wanted to know if this is possible and if so how?
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    I don't know what software you're referring to but SQL Server allows you to nest expressions. But you're better off using the CASE statement: https://msdn.microsoft.com/en-us/library/ms181765.aspx

    Comment

    Working...