![]() | |
![]() |
| | Thread Tools | Display Modes |
#11
| |||
| |||
|
|
On May 29, 12:40 pm, "ame... (AT) iwc (DOT) net" <ame... (AT) iwc (DOT) net> wrote: Hi, When you have a loop and use the "EXIT WHEN" clause, can you use it more than once? Yes. What if you have multiple places in the code where you might want to exit? Yes that works too. LOOP v_position := INSTR(v_expression,','); --- Want to exit here if v_position = 0; v_numbers(v_sub) := SUBSTR(v_expression,1,v_position-1); v_expression := SUBSTR(v_expression,v_position+1); v_position := INSTR(v_expression,','); --- --- Want to exit here if v_position = 0; v_operators(v_sub) := SUBSTR(v_expression,1,1); v_expression := SUBSTR(v_expression,v_position+1); END LOOP; Thanks! All that typing to ask us when all you needed to do was try it to find out it works. FYI you can check all the oracle documentation on-line. here's the link to the master index:http://www.oracle.com/pls/db102/show_mindex Enjoy. Ed |
#12
| |||
| |||
|
|
On May 29, 12:40 pm, "ame... (AT) iwc (DOT) net" <ame... (AT) iwc (DOT) net> wrote: Hi, When you have a loop and use the "EXIT WHEN" clause, can you use it more than once? Yes. What if you have multiple places in the code where you might want to exit? Yes that works too. LOOP v_position := INSTR(v_expression,','); --- Want to exit here if v_position = 0; v_numbers(v_sub) := SUBSTR(v_expression,1,v_position-1); v_expression := SUBSTR(v_expression,v_position+1); v_position := INSTR(v_expression,','); --- --- Want to exit here if v_position = 0; v_operators(v_sub) := SUBSTR(v_expression,1,1); v_expression := SUBSTR(v_expression,v_position+1); END LOOP; Thanks! All that typing to ask us when all you needed to do was try it to find out it works. FYI you can check all the oracle documentation on-line. here's the link to the master index:http://www.oracle.com/pls/db102/show_mindex Enjoy. Ed |
#13
| |||
| |||
|
|
On May 29, 12:40 pm, "ame... (AT) iwc (DOT) net" <ame... (AT) iwc (DOT) net> wrote: Hi, When you have a loop and use the "EXIT WHEN" clause, can you use it more than once? Yes. What if you have multiple places in the code where you might want to exit? Yes that works too. LOOP v_position := INSTR(v_expression,','); --- Want to exit here if v_position = 0; v_numbers(v_sub) := SUBSTR(v_expression,1,v_position-1); v_expression := SUBSTR(v_expression,v_position+1); v_position := INSTR(v_expression,','); --- --- Want to exit here if v_position = 0; v_operators(v_sub) := SUBSTR(v_expression,1,1); v_expression := SUBSTR(v_expression,v_position+1); END LOOP; Thanks! All that typing to ask us when all you needed to do was try it to find out it works. FYI you can check all the oracle documentation on-line. here's the link to the master index:http://www.oracle.com/pls/db102/show_mindex Enjoy. Ed |
![]() |
| Thread Tools | |
| Display Modes | |
| |