|
A variable is defined inside the stored procedure, and its value is used in the SQL statement, which is written as follows:
CREATE OR REPLACE PROCEDURE "GETMAXFLUXINWITHHYID" (
startTime in date, endTime in date
)
as
minHyId number;
begin
WHILE (minHyId <= 20) LOOP
SELECT * FROM TABLE1 WHERE HY_ID = minHyId AND PROBE_TIME BETWEEN startTime AND endTime;
minHyId: = minHyId + 1
END LOOP;
end;
Compilable always prompts errors. How should I write it correctly?
I don't know what kinds of writing methods can be used for variable transfer in stored procedures? |
|