plsql - Assign Result Query to Variable -


how put select max query result variable , use in while loop in plsql? example fine.

declare counter number; num_max number:='select max(num_sequencial) ide_identificacao';  begin num_max := num_max/1000; while(counter < num_max) ..... .. 

you should use select ... into clause:

declare counter number; num_max number;  begin select max(num_sequencial) num_max ide_identificacao;  num_max := num_max/1000; while condition loop    {...statements...} end loop; 

Comments

Popular posts from this blog

javascript - How to name a jQuery function to make a browser's back button work? -

collision detection - C++ library for mesh to mesh intersection: what is available? -

python - Django-easy-pdf: xhtml2pdf reporting reportlab 2.2+ is required, but 3.0 installed -