I'm writing a simple stored function:
CREATE OR REPLACE FUNCTION GET_GMTOFFSET
RETURN number
AS
DBoffset number(10);
UserOffset number(10);
BEGIN
DBOffset:=0;
UserOffset:=0;
select "VALUE" into DBOffset from "_SMSYSADMIN_"."SMSYSFLAGS"
where "NAME" = 'namDBTimeZone';
select "GMT_OFFSET" into UserOffset
from "_SMDBA_"."_GMT_"
where "SEQUENCE" = (select "SEQ_GMT" from "_SMDBA_"."_PERSONNEL_"
where "CODE" = user);
return DBOffset - UserOffset;
END;
I keep getting the error (PLS-00201: identifier '_SMDBA_._GMT_' must be declared). However, _SMDBA_._GMT_ is a table. Any idea what I'm doing wrong?
CREATE OR REPLACE FUNCTION GET_GMTOFFSET
RETURN number
AS
DBoffset number(10);
UserOffset number(10);
BEGIN
DBOffset:=0;
UserOffset:=0;
select "VALUE" into DBOffset from "_SMSYSADMIN_"."SMSYSFLAGS"
where "NAME" = 'namDBTimeZone';
select "GMT_OFFSET" into UserOffset
from "_SMDBA_"."_GMT_"
where "SEQUENCE" = (select "SEQ_GMT" from "_SMDBA_"."_PERSONNEL_"
where "CODE" = user);
return DBOffset - UserOffset;
END;
I keep getting the error (PLS-00201: identifier '_SMDBA_._GMT_' must be declared). However, _SMDBA_._GMT_ is a table. Any idea what I'm doing wrong?