SELECT DISTINCT
       mis.P_PART_NUMBER AS ItemNumber,
       mis.P_OPERATION_NUMBER AS SequenceNumber,
       item.PITEM_ID AS MISNumber,
       itemrev.PITEM_REVISION_ID AS RevID,
       TRIM(mis.P_SITE) AS BranchCode,
       zim_test_details.P_SEQ_NUMBER AS CharNumber,
       zim_test_details.P_TEST_DESC AS TestDescription,
       zim_test_details.P_SAMPL_TYPE AS SamplingType,
       zim_test_details.P_SAMPL_VALUE AS SamplingValue,
       zim_test_details.P_TOOLS AS ToolsGauges,
       zim_test_details.P_WORK_INTR AS WorkInstructions,
       Status.PNAME AS Status,
       Status.PDATE_RELEASED AS ReleaseDate
  FROM INFODBA.PITEM item
       INNER JOIN INFODBA.PITEMREVISION itemrev ON (item.PUID = itemrev.RITEMS_TAGU)
       INNER JOIN INFODBA.PRELEASE_STATUS_LIST listing ON (itemrev.PUID = listing.PUID)
       INNER JOIN INFODBA.PRELEASESTATUS Status ON (listing.PVALU_0 = Status.PUID)
       INNER JOIN INFODBA.PIMANRELATION imanrel ON (itemrev.PUID = imanrel.RPRIMARY_OBJECTU)
       INNER JOIN INFODBA.PFORM form ON (imanrel.RSECONDARY_OBJECTU = form.PUID)
       INNER JOIN INFODBA.PZIMMERMISDETAILS zim_mis ON (form.RDATA_FILEU = zim_mis.PUID)
       INNER JOIN INFODBA.P_TEST_DETAILS test_details ON (zim_mis.PUID = test_details.PUID)
       INNER JOIN INFODBA.P_PART_ASSOCIATION ppa ON (ppa.PUID = test_details.PUID)
       INNER JOIN INFODBA.PMISDATAOBJECT mis ON (mis.PUID = ppa.PVALU_0)
       INNER JOIN INFODBA.PZIMTESTDETAILS zim_test_details ON (test_details.PVALU_0 = zim_test_details.PUID)
  WHERE Status.PNAME IN ('Current', 'BackLevel')