Home > database >  Why in the oracle database, write a function function to determine the return value, after only retu
Why in the oracle database, write a function function to determine the return value, after only retu

Time:10-03

The create or replace function GETJITIMEREPORT (BgDate varchar) - depending on the type of report return to quarters on the first day of the
Return
Varchar
Is
I varchar (32); - report type
Res Character (32); - returns the
The begin
I:=GETJIREPORT (BgDate);
If I='1' then
Res:='January 1;
Elsif I='2' then
Res:='April 1;
Elsif I='third' then
Res:='on the 1st of July;
The else
Res:='October 1;
End the if;
return res;
end;

CodePudding user response:

Compiler error, the GETJIREPORT (BgDate) into BgDate, function inside the need to carry the function name GETJIREPORT


 create or replace function GETJITIMEREPORT (BgDate varchar) - depending on the type of report on the first day of return quarterly 
Return
Varchar
Is
I varchar (32); - report type
Res Character (32); - returns the
The begin
I:=BgDate;
If I='1' then
Res:='January 1;
Elsif I='2' then
Res:='April 1;
Elsif I='third' then
Res:='on the 1st of July;
The else
Res:='October 1;
End the if;
return res;
end;

CodePudding user response:

I:=GETJIREPORT (BgDate);

What is it?

Other grammar, no problem;

CodePudding user response:

GETJIREPORT (BgDate);
This is another definition of a function?
  • Related