TechieTony
IS-IT--Management
I am not a sql guy buy any means but I have to write alittle code at times. I need to write a case statement that does the following.
If my P21PLAY.dbo.p21_view_oe_pick_ticket.carrier_id is equal to (105999, 566588)
THEN S
If my P21PLAY.dbo.p21_view_oe_pick_ticket.carrier_id is equal to (105997, 566545)
THEN R
If my P21PLAY.dbo.p21_view_oe_pick_ticket.carrier_id is equal to (105992, 566509)
THEN T AS BILL_TO
------------------------------------------------
I tried using this case (left out all the values)
CASE P21PLAY.dbo.p21_view_oe_pick_ticket.carrier_id
WHEN 105993, 105225 THEN 'S'
WHEN 999999 THEN 'R'
WHEN 888888 THEN 'T'
ELSE 'OTHER' END AS Bill_To
But still doesnt fly.... am I missing something here?? any help is appreciated
Noncentz
If my P21PLAY.dbo.p21_view_oe_pick_ticket.carrier_id is equal to (105999, 566588)
THEN S
If my P21PLAY.dbo.p21_view_oe_pick_ticket.carrier_id is equal to (105997, 566545)
THEN R
If my P21PLAY.dbo.p21_view_oe_pick_ticket.carrier_id is equal to (105992, 566509)
THEN T AS BILL_TO
------------------------------------------------
I tried using this case (left out all the values)
CASE P21PLAY.dbo.p21_view_oe_pick_ticket.carrier_id
WHEN 105993, 105225 THEN 'S'
WHEN 999999 THEN 'R'
WHEN 888888 THEN 'T'
ELSE 'OTHER' END AS Bill_To
But still doesnt fly.... am I missing something here?? any help is appreciated
Noncentz