Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> dynamic sql questions

dynamic sql questions

From: lwm <wmli_at_yahoo.com>
Date: Wed, 21 Mar 2001 17:11:26 -0800
Message-ID: <F001.002D4372.20010321170026@fatcity.com>

Actually, two questions here:

  1. I have a dynamicly-built query that will be executed using dynamic sql: select Z, (select y from tableA t1 where t1.id=t2.id) X from tableA t2; To get the value from the query, I use: dbms_sql.column_value( theCursor, 1,columnValue); dbms_sql.column_value( theCursor, 2,columnValue); Now, how can I get the column name (i.e. X) using dynamic sql?
  2. I tried to use a group function in the above query as following: select countZ) A, (select y from tableA t1 where t1.id=t2.id) X from tableA t2 group by X; The query failed and the error message was: ORA-00904: invalid column name (i.e. Oracle says that X is not a valid column name) Is ther a way to work around this problem?

Thanks a lot.

WL



Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: lwm
  INET: wmli_at_yahoo.com
Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Wed Mar 21 2001 - 19:11:26 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US