Excel Report Generator Confusion

I was trying to do some queries to get the number of defects that have reopens, and how many times they were reopened. I was using the Bug, Audit_Log, and Audit_Properties tables to do this, but I ran into troubles with the SQL. We used to have a SQL Server database, and all these statements worked, but now with Oracle I'm having troubles.

Here is a sample SQL statement. It isn't for the above mentioned scenerios:
SELECT * FROM BUG /*Defect*/
inner join AUDIT_LOG /*Audit Log*/ on AUDIT_LOG.AU_ENTITY_ID /*Audit Log.Entity ID*/ = BUG.BG_BUG_ID /*Defect.Defect ID*/
where BUG.BG_USER_04 /*Defect.Product*/ = 'test'

If I do Test Query it works, if I do run query I get this message:
---------------------------
Error
---------------------------
The SQL query has failed to run, with the following error:
[Mercury][Oracle JDBC Driver](Internal Error) Message 1018 not found.
---------------------------
OK
---------------------------

Any advice would be greatly appreciated.
Parents
  • Verified Answer

    Here is the query to get the number of times each defect was reopened (assuming that you have a "Reopen" status for the defects) -

    SELECT AU_ENTITY_ID, count(*), BG_SUMMARY
    FROM audit_log, audit_properties, BUG where ap_table_name='bug' and AU_Action_ID =AP_Action_ID and AU_ENTITY_ID = BG_BUG_ID and AP_NEW_VALUE ='Reopen'
    group by AU_ENTITY_ID, BG_SUMMARY, BG_SEVERITY

    You can replace 'Reopen' with any other status.
Reply
  • Verified Answer

    Here is the query to get the number of times each defect was reopened (assuming that you have a "Reopen" status for the defects) -

    SELECT AU_ENTITY_ID, count(*), BG_SUMMARY
    FROM audit_log, audit_properties, BUG where ap_table_name='bug' and AU_Action_ID =AP_Action_ID and AU_ENTITY_ID = BG_BUG_ID and AP_NEW_VALUE ='Reopen'
    group by AU_ENTITY_ID, BG_SUMMARY, BG_SEVERITY

    You can replace 'Reopen' with any other status.
Children
No Data