Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- distinct on (package_value::citext)
- id,
- brand_name,
- cat_no,
- package_value,
- case when package_value ~ '^(\d+)?(\.\d+)?\s*[uμmMkK微毫公]?[tTgGlL克斤升](/[支瓶])?$'
- then substring(package_value from '^((\d+)?(\.\d+)?)')
- else null end package_qty,
- case when package_value ~ '^(\d+)?(\.\d+)?\s*[uμmMkK微毫公]?[tTgGlL克斤升](/[支瓶])?$'
- then substring(package_value from '([uμmMkK微毫公]?[tTgGlL克斤](/[支瓶])?)$')
- else package_value end package_unit
- FROM "t_product_package"
- limit 1000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement