temp table schema
Posted in 2014
Topics: General Discussion
HI EVERYONE, HOW CAN I FIND OUT A TEMP TABLE SCHEMA? THANK'S A LOT.
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
Thank's a lot Jonathan. I beg your pardon, I did not realize I was writting in capital letters.
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.