Please use more informative subject in future
I have one more problem. This is my select statement.
SELECT APERNR ASYEAR ASMONTH AAPF AVPF AEPF
BTYEAR BTMONTH BEMPLOYEEPF BEMPLOYERPF
FROM ( ZUPWARDHAWOR AS A INNER JOIN ZTRANS_ENTRY AS B
ON APERNR = BPERNR )
INTO CORRESPONDING FIELDS OF BODY1
WHERE A~SYEAR BETWEEN SYEAR AND SYEAR
AND A~SMONTH BETWEEN '04' AND SMONTH
AND A~PERNR = SMF1-PERNR AND
B~PERNR = SMF1-PERNR
ORDER BY ASYEAR ASMONTH ASCENDING .
COUNT = COUNT + 1.
TMONTH and TYEAR is a field. It contains data once a time in year or may not be.
According this statement TDATE & TMONTH is to be retrieve data but every time it is repeated.
I need if the data is availbale in table it should be extract. but it should not be repeated in every month in loop.
I hope, u guys r getting my point.
Edited by: Matt on Mar 6, 2009 10:02 AM