>>create cursor csrTypes (Type char(10) primary key) >> >>for lnI = 1 to 18 >> insert into csrTypes (Type) values (padl(lnI,10)) >>next >> >>select depno,empnam,empno, typ1,custno,; >> count(custno) As total_cfil,SUM(VAL(last)) As ntotal_cfil,SUM(VAL(now)) As ttotal_cfil,SUM(VAL(balance)) As rtotal_cfil ; >> from injaz1 In ; >> inner join csrTypes Ty on In.Typ1 = Ty.Type >> group By 1, 2,3,4,5 ; >> INTO table mucurtw >>>>
>>>Select depno,empnam,empno, typ1,custno,; >>> count(custno) As total_cfil,SUM(VAL(last)) As ntotal_cfil,SUM(VAL(now)) As ttotal_cfil,SUM(VAL(balance)) As rtotal_cfil ; >>> from injaz1 ; >>> WHERE typ1 In (' 2',' 3',' 4',' 18') ; >>> group By 1, 2,3,4,5 ; >>> INTO table mucurtw >>> >>>>>>>>hi all,
>>>>>from injaz1 ; >>>>> WHERE typ1 In (' 2',' 3',' 4',' 18') ;&& i get many typ1 as 20 ,49...etc >>>>>>>>>>thanks