I am using a case statement to compare results between tables and then allocate points based on a match. I am having a problems with radio buttons as I would like to allocate points based on the value selected in the radio button which has a value between 1-5.
e.g if table A, a customer has selected any state and in table B the rating for any state is 4 I would like to multiply 4 by 10 and then allocate the points, if no state was selected then they get 0.
,(CASE WHEN C.LocationState = P.PState THEN 20 ELSE 0 END
+CASE WHEN CLocationState = P.mstate THEN 50 ELSE 0 END
+CASE WHEN C.LocationState = p.StateBirth THEN 10 ELSE 0 END) AS geography
,(CASE WHEN c.salaryto = p.SalaryMin THEN 20 ELSE 0 END
+CASE WHEN c.salaryfrom = p.SalaryExp THEN 40 ELSE 0 END) AS salary
,(CASE WHEN c.BoardStatus = p.pBoardStatus THEN 40 ELSE 0 END
This is the problem is not sure how to add the code that will allow a comparison of an int and a varchr and then give the points.
+(CASE cl.AMG ='1' AND p.state IS NOT NULL THEN 1 X 10 ELSE 0 END
+(CASE cl.AMG ='2' AND p.state IS NOT NULL THEN 2 X 10 ELSE 0 END
+(CASE cl.AMG ='3' AND p.state IS NOT NULL THEN 3 X 10 ELSE 0 END
+(CASE cl.AMG ='4' AND p.state IS NOT NULL THEN 4 X 10 ELSE 0 END
+(CASE cl.AMG ='5' AND p.state IS NOT NULL THEN 5 X 10 ELSE 0 END) AS qualifi
Thanks in advance
e.g if table A, a customer has selected any state and in table B the rating for any state is 4 I would like to multiply 4 by 10 and then allocate the points, if no state was selected then they get 0.
,(CASE WHEN C.LocationState = P.PState THEN 20 ELSE 0 END
+CASE WHEN CLocationState = P.mstate THEN 50 ELSE 0 END
+CASE WHEN C.LocationState = p.StateBirth THEN 10 ELSE 0 END) AS geography
,(CASE WHEN c.salaryto = p.SalaryMin THEN 20 ELSE 0 END
+CASE WHEN c.salaryfrom = p.SalaryExp THEN 40 ELSE 0 END) AS salary
,(CASE WHEN c.BoardStatus = p.pBoardStatus THEN 40 ELSE 0 END
This is the problem is not sure how to add the code that will allow a comparison of an int and a varchr and then give the points.
+(CASE cl.AMG ='1' AND p.state IS NOT NULL THEN 1 X 10 ELSE 0 END
+(CASE cl.AMG ='2' AND p.state IS NOT NULL THEN 2 X 10 ELSE 0 END
+(CASE cl.AMG ='3' AND p.state IS NOT NULL THEN 3 X 10 ELSE 0 END
+(CASE cl.AMG ='4' AND p.state IS NOT NULL THEN 4 X 10 ELSE 0 END
+(CASE cl.AMG ='5' AND p.state IS NOT NULL THEN 5 X 10 ELSE 0 END) AS qualifi
Thanks in advance