If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
How to change these oracle code to db2 code:
declare cnt int;
begin
SELECT COUNT(*) INTO cnt from PODTX03
WHERE TRNDATE < INT( TOCHAR( sdate, 'YYYYMMDD' ) ) ;
end;
How to change these oracle code to db2 code:
declare cnt int;
begin
SELECT COUNT(*) INTO cnt from PODTX03
WHERE TRNDATE < INT( TOCHAR( sdate, 'YYYYMMDD' ) ) ;
end;
thanks
Check this website for a lot of valuable UDF's when migrating to DB2. Because they were created when V9 didn't exist some of them might be available allready as a builtin function.
Thanks for your reply.
Except the user defined function,
I also want to know how to
change the 'select count(*) into cnt from tb1 '
into db2.
It cannot execute like 'begin atomic declare cnt int;
select count(*) into cnt from tb1; end'.