hi all,
i have a for loop statement in my ksh code. it only returns the first value retrieved not the value for the other rows.
ex: acct_id value = returned value in the for loop
1 = 1
2 = 1 (instead of 2)
3 = 1 (instead of 3)
Is there something wrong on the syntax? Need help thanks.
sqlplus -s ${USERNAME}/${PASSWORD}@${SID} << END1 >> $LOGFILE
whenever sqlerror exit
set serveroutput on size 1000000
--
-- create customer contacts from the uploaded records
--
declare
l_rc varchar2(1) := null;
cursor c1 is
select first_name as acct_id
from sr11007_call_results_table;
begin
dbms_output.enable(1000000);
for i in c1 loop
l_rc = i.acct_id
end loop;
END1