temp tables
Posted in 2004
Topics: General Discussion
Bill Hamilton — — source: Usenet: comp.databases.informix
What is the proper sql to find out if a given temp table exists in a session? I guess there is no ansi standard for that one. sending to informix-list
↪ replying to Bill Hamilton
rkusenet — — source: Usenet: comp.databases.informix
"Bill Hamilton" <laidback@finsco.com> wrote in message news:c3dabm$d40$1@terabinaries.xmission.com...
>
> What is the proper sql to find out if a given temp table exists in a
> session?
> I guess there is no ansi standard for that one.
SELECT count(*)
from sysmaster:systabnames s,sysmaster:systabinfo i
where i.ti_partnum = s.partnum
and sysmaster:BITVAL(i.ti_flags,'0x0020') = 1
and s.tabname = 'your_tmp_table_name' ;
The query will return 1 if the temp table exists.