Looking for help creating an "IF THEN ELSE". I would like to pass my .SQL a variable from SQLPlus using the command line and detemine if the variable has actually been populated (It may or May not be). Something as follows.
Delare
dpart varchar()
begin
dpart:=&1
if dpart is null then
Select Name from mytable1
else
Select Sub_Name from mytable2
end if;
end;
Any help would be appreciated.
Delare
dpart varchar()
begin
dpart:=&1
if dpart is null then
Select Name from mytable1
else
Select Sub_Name from mytable2
end if;
end;
Any help would be appreciated.