Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Juan Roca asked how to find a temp table's schema. Art Kagel said from outside the session it is generally impossible, unless SQLTRACE captured the create statement; inside the session, PREPARE a SELECT * and DESCRIBE it into an sqlda. Jonathan Leffler agreed, noting ODBC and JDBC equivalents. Juan said he would try DESCRIBE.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
From outside of the session that created it? If you have SQLTRACE enabled,
you MIGHT have captured the create or select ... into temp statement that
created it, otherwise there is no way that I know of.
From the session that created it (ignoring the fact that the session should
KNOW what its schema is) the only way is to PREPARE a SELECT * against it
and DESCRIBE the statement into an sqlda structure or DESCRIBE record and
parse through that to discover the schema.
Art
Art S. Kagel, President and Principal Consultant
ASK Database Management
www.askdbmgt.com
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on the IIUG, nor any other organization with which I am
associated either explicitly, implicitly, or by inference. Neither do
those opinions reflect those of other individuals affiliated with any
entity with which I am affiliated nor those of the entities themselves.
On Thu, Oct 2, 2014 at 10:05 AM, JUAN ROCA <jluis.roca@hotmail.com> wrote:
> HI EVERYONE,
>
> HOW CAN I FIND OUT A TEMP TABLE SCHEMA?
>
> THANK'S A LOT.
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--089e0149338cc1516c050471cebc
Please don't SHOUT; we can hear (read) better if you don't.
Prepare a SELECT * FROM temp_table and then describe it. That gives the
column names and types. There are ODBC and JDBC equivalents to the ESQL/C
DESCRIBE statement.
On Thu, Oct 2, 2014 at 7:05 AM, JUAN ROCA <jluis.roca@hotmail.com> wrote:
> HI EVERYONE,
>
> HOW CAN I FIND OUT A TEMP TABLE SCHEMA?
>
> THANK'S A LOT.
>
--
Jonathan Leffler <jonathan.leffler@gmail.com> #include <disclaimer.h>
Guardian of DBD::Informix - v2013.0521 - http://dbi.perl.org
"Blessed are we who can laugh at ourselves, for we shall never cease to be
amused."
--001a1133c8822a5b3205047255ce
Thanks Art,
Actually I know what the SELECT .. INTO TEMP is. The problem is that I don't
kown projection-list-columns types.
I'll try DESCRIBE statement.
Your privacy choices
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.