I have values like 6864#21
, 1a2b#3598
in my database. I'm trying to extract just the portion before and after the #, so I would get something like
col1 | col2 ----------- 6864 | 21 1a2b | 3598
I tried
REPLACE('123#89', '%#', '')
but that just resulted in 123#89. Does anyone know a way I can do this?
Try this:
SELECT split_part('123#23','#',1) AS "COL1",split_part('123#23','#',2) AS "COL2"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With