Home » SQL & PL/SQL » SQL & PL/SQL » ok let me try this again (clarification)
ok let me try this again (clarification) [message #9351] Wed, 05 November 2003 12:21 Go to next message
Andy G
Messages: 25
Registered: May 2003
Junior Member
Sorry I'll try to make this clearer on my part.

Maybe if I would have showed the full example of what I was trying to accomplish. If the data is not found (through my exception) im setting the stat_message to read ID Does not exist...if it is foudn I want to verify that it is active through the the stat_type_code which would be = 1 ..if it were not active it would be another value...

thanks

Begin

Select stat_type_code
Into v_stat_type
from stat_v
where v_serial_id = serial_id;

Exception
when no_data_found then
v_message := 'ID Does not exist';

If v_stat_type = 1
then v_message := 'active'
else v_message := 'Not Active'
end if';

update raw_table set stat_message = v_message
where v_serial_id = serial_id;

end;
Re: ok let me try this again (clarification) [message #9352 is a reply to message #9351] Wed, 05 November 2003 13:15 Go to previous message
andy
Messages: 92
Registered: December 1999
Member
ok I figured out my mistake I need to have my if statement before my exception...
Previous Topic: PL/SQL ....ok this is driving me nuts
Next Topic: Drop/Truncate table with database trigger
Goto Forum:
  


Current Time: Wed Apr 24 09:06:15 CDT 2024