begin plsql

terryisme發表於2009-10-21
Declare
v_model_name varchar(40);
begin
select bs.parent into v_model_name
from sfis1.c_bom_structure_t bs
where bs.parent ='SCVCD-SASA'
and bs.bubble_number = 300
and rownum =1;
if v_model_name is not null then
Dbms_Output.put_line(v_model_name);
else
Dbms_Output.put_line('No Model Found now');
end if;
end;[@more@]Declare
v_model_name varchar(40);
begin
select bs.parent into v_model_name
from sfis1.c_bom_structure_t bs
where bs.parent ='SCVCD-SASA'
and bs.bubble_number = 300
and rownum =1;
if v_model_name is not null then
Dbms_Output.put_line(v_model_name);
else
Dbms_Output.put_line('No Model Found now');
end if;
end;

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/93029/viewspace-1027999/,如需轉載,請註明出處,否則將追究法律責任。

相關文章