[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Variables



I'm trying to store the values of employees with multiple plans (two rows of
data) into two separate variables.
Is this logic remotely possible?

Begin-Procedure Main
Begin-Select Distinct

fbep.ssn_n  (1,1)

 print $plan1 (1,20)
 print $plan2 (1,40)

 next-listing

from dbo.t_fbep_emp_plan fbep
where  fbep.clnt_id_n = 1810
  and   ($plan1 = (select(fbep1.db_plan_n) from t_fbep_emp_plan fbep1
                         where fbep.clnt_id_n = fbep1.clnt_id_n
                          and   fbep.ssn_n = fbep1.ssn_n
                          and  fbep.db_plan_n = '001')

  or     $plan2 = (select(fbep2.db_plan_n) from t_fbep_emp_plan fbep2
                         where fbep.clnt_id_n = fbep2.clnt_id_n
                          and   fbep.ssn_n = fbep2.ssn_n
                          and  fbep.db_plan_n = '201'))

End-Select
End-Procedure