Im trying to insert a statement into a stored procedure that will conditionally assign the value of 'Net'.. basically what I want to say is:
(IF eventseat.buyertype LIKE '1%' OR
eventseat.buyertype LIKE '5%' THEN
SELECT((SUM(eventseat.price - 2)) / 1.11475)
ELSE (SELECT SUM(eventseat.price))
AS 'Net'
I've tried this all different ways, but it looks like I cannot use if...then...else in conjunction with Select. Any hints on how to do what Im after? Thanks !
(IF eventseat.buyertype LIKE '1%' OR
eventseat.buyertype LIKE '5%' THEN
SELECT((SUM(eventseat.price - 2)) / 1.11475)
ELSE (SELECT SUM(eventseat.price))
AS 'Net'
I've tried this all different ways, but it looks like I cannot use if...then...else in conjunction with Select. Any hints on how to do what Im after? Thanks !