Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Retreiving Column/Table Names from a Query Using OCI
Daniel Morgan <dmorgan_at_exesolutions.com> wrote in
news:3D20E051.6D0DC841_at_exesolutions.com:
> Flavius Vespasianus wrote:
>
>> I have an application that I am trying to switch from "BDE to ODBC to >> oracle" to OCI directly. >> >> The problem I have having is that the application uses dynamic >> queries. >> >> If I have a query like >> >> SELECT * from A, B WHERE A.X = B.X >> >> I need to know in the result set which columns come from A and which >> come from B. Unfortunately, when I use the examples in the OCI >> manual, only the column name gets returns. >> >> How can I get the table name for a column in a result set?
Unfortunately, that is impossible with this application.
> But I don't see what you are doing as dynamic queries ... they look
> completely static to me. If you want dynamic queries look at native
> dynamic SQL and the DBMS_SQL built-in package.
This was a very simple example. About 80% of the code in this this overengineered application is devoted to building queries on the fly and interpreting the results. In order to do this it needs the table name in the results. Received on Tue Jul 02 2002 - 07:51:01 CDT
![]() |
![]() |