Help : Convert interbase stored proc
From: William Buchanan <william.buchanan_at_freenet.co.uk>
Date: 3 Nov 2003 04:26:05 -0800
Message-ID: <26d39d38.0311030426.768726eb_at_posting.google.com>
Date: 3 Nov 2003 04:26:05 -0800
Message-ID: <26d39d38.0311030426.768726eb_at_posting.google.com>
Hi
I have the following stored proc in interbase (which might contain
errors - i'm doing it off the top of my head), which I would like to
convert into oracle. Can you help? What I want back is a dataset of
all the records where Ch_Val is different to the previous value.
Thanks for any help.
create procedure GetChanges(StartDate timestamp, EndDate timestamp)
returns(SettDate timestamp, Ch_ID integer, Ch_Val integer)
as
declare variable lastVal integer;
begin
lastVal = -1;
for select * from ChData
where SettDate between :StartDate and :EndDate
order by SetDate
do
begin
if Ch_Val <> lastVal then
suspend;
end;
end
Received on Mon Nov 03 2003 - 13:26:05 CET