Home » SQL & PL/SQL » SQL & PL/SQL » nested if
nested if [message #248654] Fri, 29 June 2007 23:07 Go to next message
Messages: 13
Registered: June 2007
Junior Member
I am having problems with nested if statements in order to raise exceptions on invalid conditions .

How can I use
if (last is NuLL) || (first is NULL) || (middle is NULL) then raise exception;

I have a block similar to

if comma > 0 then
street1 := substr(line,comma);
zip := substr(line,space);
city := substr(line ,comma,space);
elsif space != 0 then
<<< another street , city , zip expressions>>

If any of street , city or zip part is missing then it should call exception.
i tried nested if ..elsif it didnt work;
Re: nested if [message #248655 is a reply to message #248654] Fri, 29 June 2007 23:17 Go to previous message
Messages: 25578
Registered: January 2009
Location: SoCal
Senior Member
Please read & FOLLOW ALL posting guidelines as enumerated in #1 STICKY post at top of forum.

"didnt work; " is not a recognized Oracle error.

My car is a blue 4 door sedan.
My car didn't work.
Please tell me how to fix it.

Do yourself & us a favor, Read The Fine PL/SQL Reference Manual as found at:

Many fine coding examples can be found at http://asktom.oracle.com

If/when NEITHER answers your question, then post back here!

Using nested IF is NOT required to implement requirements.

[Updated on: Fri, 29 June 2007 23:28] by Moderator

Report message to a moderator

Previous Topic: data in (insert into XXDSC_REVENUE_REPORT_DETAIL_MV) is not inserting
Next Topic: Level Pseudo Column
Goto Forum:

Current Time: Tue Aug 22 02:31:48 CDT 2017

Total time taken to generate the page: 0.02849 seconds