Re: NewEra & Temp Tables
Posted in 1997
On Fri, 10 Oct 1997 Ttgchicago@aol.com wrote:
> In a message dated 97-10-10 09:55:44 EDT, you write:
>
> << Why do you think that the temp tables are not created? How did you
> try to verify this? Did you select from temptablename in the same
> program and get an SQL error -206, ISAM -111 or did you get 100 (NOT
> FOUND)? Or did you try to locate the table from another process? Or by
> looking in systables? Temp tables are not recorded in systables nor are
> they visible from other application sessions. >>
>
> Within the program I selected from temptablename and got an sqlca.sqlcode =
> 100. I also tried seeing the table from within ISQL before the program was
> terminated and the table was not found. I know for a fact that the syntax in
> the program work because it is a simple 4gl (no OO code) function and it
> works fine on my legacy system.
OK, that is what I thought. Sqlcode=100 is SQLNOTFOUND meaning there were
no rows in the temp table but that it had indeed been created. If the temp
table had not been created then you would have gotten sqlcode=-206 Table
not found. It seems that there are no rows in the source table which
matched the where clause filter. Did you try the same query in
dbaccess/isql fetching to the screen? If you post the query we can tell
you if there are any logical inconsistencies that would cause no rows to be
returned, but, obviously only you can verify the exact column values being
compared. Again try to debug the SQL in isql.
You cannot see a temp table from another session. Temp tables are private
to the session that created them. They do not appear in systables nor
explicitely in any sysmaster table. This is why the temp table was not
found in the isql session.
Art S. Kagel, kagel@bloomberg.com