Home DADE
New Blog Posts: Merging Reports - Part 1 and Part 2

stop using magic sql

edited March 2004 in DADE
i would like to stop using the magic sql when i open a linked dataview
created in DADE. for example i create a linked dataview that shows the
following SQL in the SQL tab of the designer.

SELECT DR_TRANS_1.SEQNO,
DR_TRANS_1.TRANSDATE,
DR_TRANS_1.ACCNO,
DR_TRANS_1.INVNO,
DR_TRANS_1.SUBTOTAL,
DR_TRANS_1.TAXTOTAL,
DR_TRANS_1.AMOUNT
FROM DR_TRANS DR_TRANS_1
WHERE ( DR_TRANS_1.SEQNO = 1 )

this dataview is linked to a master dataview on the DR_TRANS_1.ACCNO field.
When this dataview is opened the following magic sql is actually passed to
the RDBMS. (found by cntrl-left click on the data view)

SELECT DR_ACCS_1.ACCNO ACCNO_2, DR_TRANS_1.SEQNO,
DR_TRANS_1.TRANSDATE, DR_TRANS_1.ACCNO,
DR_TRANS_1.INVNO, DR_TRANS_1.SUBTOTAL,
DR_TRANS_1.TAXTOTAL, DR_TRANS_1.AMOUNT
FROM DR_ACCS DR_ACCS_1
INNER JOIN DR_TRANS DR_TRANS_1 ON
(DR_TRANS_1.ACCNO = DR_ACCS_1.ACCNO)
WHERE ( DR_ACCS_1.ACCNO = 1 )
AND ( DR_TRANS_1.SEQNO = 1 )
ORDER BY DR_TRANS_1.ACCNO

is it possible for me to stop the magic sql being passed and have the
orginal sql passed to the server. I realise that this would stop the report
engine from working correctly, but this particular section of my application
is basically using the DADE as a sql statement creation tool.

btw - i can acheive this if i dont link the dataviews becuase it doesnt
alter the sql statement, but i need to link them becuase i use the link
information in the application in another way

thanks
Cameron.
This discussion has been closed.