Subject | Re: [ib-support] SELECT INTO local variable appears to be not working |
---|---|
Author | Daniel Rail |
Post date | 2003-05-27T22:16:47Z |
Hi,
At May 27, 2003, 18:43, Noel Cosgrave wrote:
in front. You typed it correctly in the following line.
Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)
At May 27, 2003, 18:43, Noel Cosgrave wrote:
> I have a stored procedure along the following lines:It should be :VIEWCOUNT, not VIEWCOUNT. You simply forgot the colon
> DECLARE VARIABLE VIEWCOUNT INTEGER;
> BEGIN
> SELECT COUNT(ACCESS_LOG_ID) FROM WEB_USERACCESSLOG WHERE CURRENT_TIMESTAMP - LOG_DATE <= 7 AND USER_ID = :USER_ID AND
> PROJECT_ID = :PROJECT_ID INTO VIEWCOUNT;
in front. You typed it correctly in the following line.
> SELECT PROJECT_NAME FROM PROJECTS WHERE PROJECT_ID = :PROJECT_ID INTO :PROJECT_NAME;--
> SUSPEND;
> IF (VIEWCOUNT = 0) THEN
> BEGIN
> INSERT INTO USERACCESSLOG VALUES (-1,:USER_ID,:PROJECT_ID,CURRENT_TIMESTAMP);
> END
> END
Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)