Quote:
|
Originally Posted by kingp
Hi All ,
I had a concern tht is it possible to call other procedures from one procedure(like proc A calling proc B and C) in DB2... i know we can do it easily in oracle making A main and then using call func. using package also .But was wondering how can it be possible in DB2.
|
yes it is very much possible...in db2 also you use the call function
suppose you have a procedure A defined as
create procedure A
begin
some logic
call B (in, out); --where B is some other procedure
end
and then you can call A which in turn will call B....
if you want some value back from B use it in the out variable.....
though there r various ways you can return parameters depending upon wether you r returning it to client or caller.....
Quote:
|
Originally Posted by kingp
Also I had a date in oracle which has inputs like
week in ( input_date , input_date - 7 )
both week and input_date have date datatype but week is in format like 5/17/2006 12:00:00 AM
how do we tackle it in db2 .....is it possible to delete 7 which is number from date type....ofcourse we can convert it to date but tht would reduce the accuracy as year wont be there to judge.
Please suggest your opinion
|
use the week scalar function if i have guessed your problem correctly....