pg.ddx.io pgsql-odbc@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Best way of retrieving tablename from a query ? 3+ messages / 1 participants [nested] [flat]
* Best way of retrieving tablename from a query ? @ 2005-07-17 07:47 lothar.behrens@lollisoft.de 0 siblings, 0 replies; 3+ messages in thread From: lothar.behrens@lollisoft.de @ 2005-07-17 07:47 UTC (permalink / raw) To: pgsql-odbc Hi, I have implemented a function to retrieve the table name from a SQL query by analysing the SQL query string. Now I tried to use the SQLColumns to do this, because avoiding special handling of joined or multible tables in a query. The orginal sample code uses an uninitialized hstmt in it's call, so I assumed, it must be the statement, that I have created from the orginal query to retrieve the table from. Is this correct, or is there a better way to do this ? Thanks Lothar -- Lothar Behrens | Rapid Prototyping ... Rosmarinstr 3 | 40235 Düsseldorf | www.lollisoft.de ^ permalink raw reply [nested|flat] 3+ messages in thread
* Best way of retrieving tablename from a query ? @ 2005-07-20 16:54 lothar.behrens@lollisoft.de 0 siblings, 1 reply; 3+ messages in thread From: lothar.behrens@lollisoft.de @ 2005-07-20 16:54 UTC (permalink / raw) To: pgsql-odbc Hi, my last question seems to be overseen. Isn't there a good way to get the table name from a given SQL query without inspecting the query it self ? My last try to use SQLColumns was partially usable. It returned a table name, but it does not stay in relation to my query. Thanks Lothar -- Lothar Behrens | Rapid Prototyping ... Rosmarinstr 3 | 40235 Düsseldorf | www.lollisoft.de ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Best way of retrieving tablename from a query ? @ 2005-07-20 18:11 lothar.behrens@lollisoft.de parent: lothar.behrens@lollisoft.de 0 siblings, 0 replies; 3+ messages in thread From: lothar.behrens@lollisoft.de @ 2005-07-20 18:11 UTC (permalink / raw) To: pgsql-odbc Hi, now I have found the function for this requirement. SQLColAttribute with SQL_DESC_BASE_TABLE_NAME as the third parameter gives me what I need. Lothar -- Lothar Behrens | Rapid Prototyping ... Rosmarinstr 3 | 40235 Düsseldorf | www.lollisoft.de ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2005-07-20 18:11 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2005-07-17 07:47 Best way of retrieving tablename from a query ? lothar.behrens@lollisoft.de 2005-07-20 16:54 Best way of retrieving tablename from a query ? lothar.behrens@lollisoft.de 2005-07-20 18:11 ` lothar.behrens@lollisoft.de
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox