OPM Quality – Query to List Test Codes Information

/*********************************************************
*PURPOSE: Query to List Test Codes Information *
*AUTHOR: Shailender Thallam *
**********************************************************/
SELECT gqtb.test_id,
  gqtb.test_code,
  gqtt.test_desc,
  gqtb.test_class,
  gtmb.test_method_code,
  lkp1.meaning data_type,
  gqtb.test_unit,
  lkp2.meaning priority ,
  gqtb.min_value_num,
  gqtb.max_value_num,
  gqtb.test_group_order ordering
FROM gmd_qc_tests_b gqtb,
  gmd_qc_tests_tl gqtt,
  gmd_test_methods_b gtmb,
  gem_lookups lkp1,
  gem_lookups lkp2
WHERE 1           = 1
AND gqtb.test_id  = 16
AND gqtb.test_id  = gqtt.test_id
AND gqtt.language = userenv('lang')
  --
AND gqtb.test_method_id = gtmb.test_method_id
  --
AND lkp1.lookup_type = 'GMD_QC_TEST_TYPE'
AND gqtb.test_type   = lkp1.lookup_code
  --
AND lkp2.lookup_type = 'GMD_QC_TEST_PRIORITY'
AND gqtb.priority    = lkp2.lookup_code ;