I have a data extension with a level field based on the subscription level of customers. The fieldcontains 4 options, beginner, intermediate, expert and when they choose nothing it is unspecified(BLANK), it doesn't show anything.

I'm trying to get the beginner field and unspecified only

So far, I've tried

WHERE l.Level NOT like '%intermediate%'

AND l.Level NOT like '%expert%'

but that only gives me the beginner customers and I also need the ones that have the status unspecified.

I'm trying to use regexp but I'm not confident with the syntax and I get an error

WHERE l.level not like REGEXP '^[^intermediate]' 

AND l.level not like REGEXP '^[^expert]' 

1 Answer 1


Most likely your blank value is null so update your first where clause to :

WHERE l.Level like '%beginner%'

OR l.level is NULL
  • if I only do l.level is NULL I get the right data and if I only do l.Level like '%beginner%' I get the right data as well but when I do them together, using AND or OR I get 0 records
    – Duicug
    Sep 2, 2019 at 13:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .