Skip to Content
0
Former Member
Jul 30, 2009 at 11:29 AM

compare 2 tables and write it to returen table

25 Views

HI ,

I am using this select and i want to compare between the user that i got to the select

and the user that is found after the select .

i.e. if i got 10 employees in it_userid and from it in the table Zd_DB_dc i found just

7 employees i want to write the 3 employee to LT_returen table .

What is the best way to do that (performance is important since es_dev can have more than 1000

users)

IF NOT it_userid[] IS INITIAL .

SELECT *

FROM Zd_DB_dc

INTO CORRESPONDING FIELDS OF TABLE es_dev

FOR ALL ENTRIES IN it_userid

WHERE userid = it_userid-userid.

Regards

Joy