question

Ep3388 avatar image
Ep3388 asked

Still learning how to write SQL queries

Found the answer with Case When

sql query
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
anthony.green avatar image
anthony.green answered

It sounds like you need a CASE statement


case when productid = 27 then ‘Commercial’
when productid = 29 then ‘Point of Service’

end

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.