|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Fw: using TIMESTAMP
From: Matteo Gattoni (matteo.gattoni
icteam.it)
Date: Thu Jun 17 2004 - 06:03:34 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello,
I have the following procedure (in reality, mine is a bit more complex, but this is usefull).
DROP FUNCTION ISEMPLOYEEINCONTEXT
//
CREATE FUNCTION ISEMPLOYEEINCONTEXT (COMPANYID FIXED(9,0), HUMANRESOURCEID FIXED(9,0),
DSTARTCHR TIMESTAMP) RETURNS NUMBER AS
VAR RES INT;
TRY
SELECT 1 INTO :RES
FROM
PSF.COMPANY_HUMAN_RESOURCE A WHERE
DATE(:DSTARTCHR)=DATE(A.D_START);
RETURN RES;
CATCH
IF $RC <> 100 THEN STOP($RC,$ERRMSG)
ELSE RETURN 0;
//
GRANT EXECUTE ON PPORTAL_PERMISSION.ISEMPLOYEEINCONTEXT TO PSF
//
GRANT EXECUTE ON PPORTAL_PERMISSION.ISEMPLOYEEINCONTEXT TO PPORTAL
//
When i use it in a select like this
select ISEMPLOYEEINCONTEXT(1, 200046, D_START) from PSF.COMPANY_HUMAN_RESOURCE
I receive th error
General error;-9111 POS(1) System error: Move error.
It's seems that I have problems with timestamp convertion or something like that.
What could I do?
Thank!
Matteo
*************************************
Matteo Gattoni
ICTeam S.p.A.
Via Azzano S.Paolo, 139
24050 GRASSOBBIO (BG)
Tel.: +39 035 4232156
Fax: +39 035 4522034
e-mail: matteo.gattoni
icteam.it
*************************************
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]