I've been struggling on how to get an SQL statement into a variable and
use that variable in another statement. IE. in MS SQL, I can do
something like this:
Select @Thisvar = table.column from othertable.colu mn
where otherColumn = someuniquerow
Select othertable.colu mn from othertable2.col umn
where anotherColumn = @Thisvar
How do I do this in DB2? Please help point me in the right direction (or
mdoc). Either I've read it and misinterpreted the results or looking in
all the wrong places. I'm running iSeries V5.r2.
Thanks
Chris
use that variable in another statement. IE. in MS SQL, I can do
something like this:
Select @Thisvar = table.column from othertable.colu mn
where otherColumn = someuniquerow
Select othertable.colu mn from othertable2.col umn
where anotherColumn = @Thisvar
How do I do this in DB2? Please help point me in the right direction (or
mdoc). Either I've read it and misinterpreted the results or looking in
all the wrong places. I'm running iSeries V5.r2.
Thanks
Chris