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

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

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