Subject splitting column in select statement
Author James
Hi guys. Thanks for the help last time concerning the sql puzzle I have
posted.

Here is code of my stored procedure

for select amount
from accountransaction
into :amount, :type
do
begin
in=0; out=0; adj=0;
if (type = 'IN') then
:in=amount;
esle if (type = 'OUT') then
:out=amount;
if (type = 'ADJ') then
:adj=amount;
end

the type and amount are variables while the in, out , adj are output
parameters.

so what this stored procedures does is splitting the amount according to
its type. can I do something like this without doing it in stored
procedure but in select statement only?

Thanks

James