query to find tablename, bindvariable column names [message #618034] |
Mon, 07 July 2014 00:30 |
grpatwari
Messages: 288 Registered: June 2008 Location: Hyderabad
|
Senior Member |
|
|
Hi,
I have to write query to find the schema tablename and respected bind variable column names in the query.I have to insert these details into one table. Please advice how to proceed on this.
For example: My query is as below.
SELECT OP.RXC_OPPORTUNITY_ID,
OAH.ATTEMPT_STATUS,
OAH.USER_CREDENTIALS,
OAH.CREATED_DATE
FROM OPPORTUNITY OP, OPPORTUNITY_ATTEMPT_HISTORY OAH
WHERE OP.RXC_OPPORTUNITY_ID = OAH.RXC_OPPORTUNITY_ID
AND OP.RXC_OPPORTUNITY_ID = :1
AND (IS_INACTIVE IS NULL OR IS_INACTIVE = 'N')
AND OP.ZONE = :2;
Need to find the table names:
1. OPPORTUNITY and bind variable column names: RXC_OPPORTUNITY_ID, ZONE.
2. OPPORTUNITY_ATTEMPT_HISTORY
|
|
|
|
|
Re: query to find tablename, bindvariable column names [message #618044 is a reply to message #618041] |
Mon, 07 July 2014 02:40 |
|
Michel Cadot
Messages: 68643 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
What I mean is you have to scan and analyze your statement if you want the output you gave for the statement you gave. AFAIK, there is no built-in procedure to do it.
In addition, are your column names always prefixed by the table name or alias? If not, you also have to find, from Oracle dictionary, which table a column name belongs to.
|
|
|