on ‎2015 Sep 25 2:21 PM
I want to see the SQL script that is generated when I run my graphical calculation. By this I do not mean the select statement that extracts data from the view, but the statement that gets data from the database itself which includes the names of tables used inside the calculation view. Does anyone know of a way to do this?
Thanks.
Request clarification before answering.
Thanks for your replies. What I need is an SQL statement that contains not only table names but also join information, such that I can delete the view but still be able to run the SQL and get the same results. Something like:
SELECT TBL1.COL1, TBL2.COL1, TBL2.COL2
FROM TBL1, TBL2
WHERE TBL1.COL1 = TBL2.COL1
Instead of:
SELECT COL1, COL2
FROM CALVIEW
Is it possible?
Thanks
Rehan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rehan,
To get the JOIN conditions applied in a view, you can use the system view CS_JOIN_CONDITIONS.
It will also tell you the type of JOIN applied along with the tables/columns.
Here is a sample query:
SELECT VIEW_NAME, TABLE_NAME1, COLUMN_NAME1,TABLE_NAME2, COLUMN_NAME2, JOIN_TYPE
FROM CS_JOIN_CONDITIONS
WHERE VIEW_NAME = 'YOUR_VIEW_NAME'
Regards,
Varun
| User | Count |
|---|---|
| 13 | |
| 8 | |
| 7 | |
| 5 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.