This is what I want to do. I want to
SCAN FOR agcympep.org_cli_cd <> agcyinfo.org_cli_cd
and then do an insert if agcympep table when it does not have the record that exist in agcyinfo.
INSERT INTO agcympep (org_id,org_cli_cd,org_nm,addr_ln1_n,addr_ln2_n,addr_ln3_n,addr_ln4_n,;
city_nm,st_cd,zip_cd,zip_plus4_,county,members);
VALUES (agcyinfo.org_id,org_cli_cd,agcyinfo.org_nm,;
agcyinfo.addr_ln1_n,agcyinfo.addr_ln2_n,agcyinfo.addr_ln3_n,agcyinfo.addr_ln4_n,;
agcyinfo.city_nm,agcyinfo.st_cd,agcyinfo.zip_cd,agcyinfo.zip_plus4_,;
agcyinfo.county,agcyinfo.members);
loop
endscan
This logic causes an inserting into agcympep after each read of agcyinfo of the 1st record in agcyinfo.
I had 870+ records in agcympep and after this logic, I had 1750+ records where every other one of records were the 1st record in the table.
Please help.
Betty :-(
SCAN FOR agcympep.org_cli_cd <> agcyinfo.org_cli_cd
and then do an insert if agcympep table when it does not have the record that exist in agcyinfo.
INSERT INTO agcympep (org_id,org_cli_cd,org_nm,addr_ln1_n,addr_ln2_n,addr_ln3_n,addr_ln4_n,;
city_nm,st_cd,zip_cd,zip_plus4_,county,members);
VALUES (agcyinfo.org_id,org_cli_cd,agcyinfo.org_nm,;
agcyinfo.addr_ln1_n,agcyinfo.addr_ln2_n,agcyinfo.addr_ln3_n,agcyinfo.addr_ln4_n,;
agcyinfo.city_nm,agcyinfo.st_cd,agcyinfo.zip_cd,agcyinfo.zip_plus4_,;
agcyinfo.county,agcyinfo.members);
loop
endscan
This logic causes an inserting into agcympep after each read of agcyinfo of the 1st record in agcyinfo.
I had 870+ records in agcympep and after this logic, I had 1750+ records where every other one of records were the 1st record in the table.
Please help.
Betty :-(