Advertisement
Pandaaaa906

Untitled

Feb 2nd, 2023 (edited)
1,517
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT
  2. distinct on (package_value::citext)
  3. id,
  4. brand_name,
  5. cat_no,
  6. package_value,
  7. case when package_value ~ '^(\d+)?(\.\d+)?\s*[uμmMkK微毫公]?[tTgGlL克斤升](/[支瓶])?$'
  8. then substring(package_value from '^((\d+)?(\.\d+)?)')
  9. else null end package_qty,
  10. case when package_value ~ '^(\d+)?(\.\d+)?\s*[uμmMkK微毫公]?[tTgGlL克斤升](/[支瓶])?$'
  11. then substring(package_value from '([uμmMkK微毫公]?[tTgGlL克斤](/[支瓶])?)$')
  12. else package_value end package_unit
  13.  
  14.  
  15. FROM "t_product_package"
  16.  
  17. limit 1000
  18.  
  19.  
  20.  
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement