Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Excluding symbols from strings

I have to filter one column (Product_Name) but I need to show only results which does not include symbols ‘_’ and ‘<‘

any ideas?

SELECT p.PRODUCT_NAME,oi.QUANTITY as "TOTAL_QUANTITY",o.ORDER_MODE
from PRODUCT_INFORMATION p
 join ORDER_ITEMS oi
 on p.PRODUCT_ID = oi.PRODUCT_ID
 join ORDERS o
 on oi.ORDER_ID = o.ORDER_ID
 where p.PRODUCT_NAME NOT IN ('<','(_)')
group by p.PRODUCT_NAME,o.ORDER_MODE,p.PRODUCT_ID,oi.PRODUCT_ID,oi.ORDER_ID,o.ORDER_ID,oi.QUANTITY
having oi.QUANTITY >= 200;

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

instr function might be one option:

where instr(p.product_name, '<') = 0
  and instr(p.product_name, '_') = 0
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading