0

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

0

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

WHERE l.Level like '%beginner%'

OR l.level is NULL
1
  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.