Hello,
When I try to run the following command in a SQL Dialog window, I am
getting an error stating that there is a missing delimiter ")" at the first
"AS" word.
Since I am not a veteran of maxDB and did not find any examples of the
sort in the documentation, I would appreciate it if somebody can let me know
what the problem is.
In appreciation,
Edward Pius.
CREATE DBPROC SP301_GETREAD
(
in I_DEVICESERIALNUM CHAR(18),
in I_TS NUMERIC(10, 0)
,
out O_KWH CHAR(10),
out O_TS CHAR(10)
)
AS
/* DECLARES */
/* END DECLARES */
BEGIN
WHILE $RC = 0 DO
BEGIN /* MAIN BLOCK */
SELECT KWH, TS
INTO
:o_KWH, :o_TS
FROM DBA.METERREAD
WHERE
DEVICESERIALNUM = :i_DEVICESERIALNUM AND
TS > CAST((i_TS - 3601) AS CHAR(10)) AND
TS < CAST((:i_TS + 3601) AS CHAR(10)) ;
END ; /* MAIN BLOCK */
END;