I had a sample DB2 7.x script working with the "if" statement, but I managed to overwrite the working copy. (Not one of my better moments...) Oh, well... Can someone help me?
The DB2 script is named temp5.sql and contains the following syntax:
connect to metrics@
begin atomic
declare testVar integer default 0;
set testVar = 1;
if testVar=0 then
select 'Zero' from sysibm.sysdummy1;
else
select 'Non-Zero' from sysibm.sysdummy1;
end if;
end@
connect reset@
And I think it got called with the following AIX 4.3.3 syntax, but I'm not sure:
db2 -tvf temp5.sql
Thanks in advance!
Jon
The DB2 script is named temp5.sql and contains the following syntax:
connect to metrics@
begin atomic
declare testVar integer default 0;
set testVar = 1;
if testVar=0 then
select 'Zero' from sysibm.sysdummy1;
else
select 'Non-Zero' from sysibm.sysdummy1;
end if;
end@
connect reset@
And I think it got called with the following AIX 4.3.3 syntax, but I'm not sure:
db2 -tvf temp5.sql
Thanks in advance!
Jon