Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Question on SQL%rowcount value
Just a quick question.
I have a stored procedure which inserts rows to a table from a data file, then updates the newly-added rows with values in the footer of the load file. I used SQL%rowcount to determine if the last step was successfull and decided to display the number of rows updated, but I don't seem to be getting the currect value. Below is a sample of the program; does anyone have any idea what's going on? Thanks!
BEGIN
/* open file stuff */
LOOP
BEGIN
utl_file.get_line(v_infile_handle,v_file_buffer); EXIT WHEN SUBSTR(v_file_buffer,1,6) = 'FOOTER' v_counter := v_counter + 1; get_rec(v_file_buffer,closeout_detail_rec); -- Edit & format load data insert_rec(closeout_detail_rec); EXCEPTION /*blah blah blah */
IF SQL%rowcount = 0 THEN
RAISE footer_totals_not-set;
ELSE
dbms_output.put_line(SQL%rowcount || ' rows updated with footer data');
END IF;
COMMIT;
/* close file stuff */
EXCEPTION
/* blah blah blah */
END;
Received on Mon May 12 2003 - 08:43:52 CDT
![]() |
![]() |