Re: ** Another Challenge **
Posted in 1995
>
>
> Sorry, but you are wrong!
>
> The drop table statement works fine when the table exists, the only
> time you will get a -status error is when the table is created for
> the first time. That's what the WHENEVER ERROR CONTINUE statement
> is for.
Your 'Drop Table' is different from the Table You are creating
>
> You might like to use this method in future. It's highly efficient.
>
> We did get a response direct from Informix US on the CHALLENGE, and they
> admitted there boo boo. The problem is a bug. When a temp table is
> dropped within a transaction, it cannot be re-created within that
> transaction. The bug is, that it won't moan at you to tell you the
> rows are not going in.
>
> Good luck and thanks for the reply.
>
> Neil - storm@aztec.co.za
>
>
Since you have not mentioned about your INFORMIX product's versions/releases,
may be it is a bug in that version. I tested the following code in my
system which behaves absolutely normal.
# --- Begin Program
database fred
main
define c smallint
begin work
create temp table tmp ( a smallint ) with no log
insert into tmp values (1)
insert into tmp values (1)
insert into tmp values (1)
select count(*) into c from tmp
display " First Occasion : ", c
drop table tmp
create temp table tmp ( a smallint ) with no log
insert into tmp values (1)
insert into tmp values (1)
insert into tmp values (1)
insert into tmp values (1)
insert into tmp values (1)
insert into tmp values (1)
select count(*) into c from tmp
display " Second Occasion : ", c
commit work
end main
# --- End Program
Result
First Occasion = 3
Second Occasion = 6
--
Out Environ
HP-UX/9000/847/A.9.04
INFORMIX
DBACCESS : 5.01.UD3
ISQL : 4.11.UC1
I4GL : 4.11.UC4
Rgds,
Chetan Anand
--------------------------------------------------------------------------
DHL INTERNATIONAL (Singapore) Pte Ltd
Singapore
e-mail : anand@sin-co.sin-ro.dhl.com
--------------------------------------------------------------------------