SHARE
TWEET

Untitled

a guest Sep 16th, 2019 93 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. with tab as (
  2.     SELECT
  3.         pi.id_ AS pi_id,
  4.         (convert_from(defect_bytes.bytes_, 'UTF8')::json -> 'fields') ->> 'requestPropertyGuid' AS requestPropertyGuid
  5.     FROM act_hi_procinst pi
  6.          inner JOIN act_hi_varinst defects ON defects.proc_inst_id_ = pi.id_ AND defects.name_ = 'defects'
  7.          inner JOIN act_ge_bytearray defect_bytes ON defect_bytes.id_ = defects.bytearray_id_
  8.      WHERE pi.proc_def_key_ = 'SRV-14'
  9. )
  10. select tab.*
  11. from tab  
  12. where requestPropertyGuid = '45b970e0-d00d-11e7-80cd-001dd8b71c2c'
  13. limit 10;
  14.  
  15.  
  16. select tab.*
  17. from  (
  18.    SELECT pi.id_ AS pi_id,
  19.     (convert_from(defect_bytes.bytes_, 'UTF8')::json -> 'fields') ->> 'requestPropertyGuid' AS requestPropertyGuid
  20.    
  21.     FROM act_hi_procinst pi
  22.    
  23.          inner JOIN act_hi_varinst defects ON defects.proc_inst_id_ = pi.id_ AND defects.name_ = 'defects'
  24.          inner JOIN act_ge_bytearray defect_bytes ON defect_bytes.id_ = defects.bytearray_id_
  25.      
  26.     WHERE pi.proc_def_key_ = 'SRV-14'
  27.     )  tab
  28.        
  29. where requestPropertyGuid = '45b970e0-d00d-11e7-80cd-001dd8b71c2c'
  30. limit 10;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top