SELECT  /*enumCLEARQUEST_DEVI_ID*/ AS iss_db,
    si.dbid AS iss_id,
    si.new_num AS iss_num,
    si.headline AS summary,
    sdef.name AS status,
    si.priority AS priority,
    si.issue_type AS issue_type,
    dbms_lob.substr( si.integration_notes, 4000, 1 )as int_notes,
    dbms_lob.substr( si.codereview_reference, 4000, 1 )as cr_ref,
    si.risk as risk,
    si.related_database_patches as db_patches,
    si.affected_packages as affected_packages
FROM  CQ_software_issue si INNER JOIN CQ_statedef sdef ON si.state = sdef.id
WHERE  si.dbid IN (/*DEVIiss*/)
ORDER BY iss_num ASC
