Skip to Content
Oct 14, 2020 at 09:37 AM

BODS - SQL Transform case statement with '%[0-9]%'


I have a case statement in SQL

Case when Fieldname like '%[0-9]%' then NULL else Fieldname end as Field

This works fine when the SQL is run by itself, but when embedded on SQL Transform and utilized on a Dataflow, it skips the whole statement and renders Fieldname for Field.

Things I tried

1. I tried to use Match_regex in the Query transform. But since the field does not have a pattern and a number could be any where, that did not work.

2. Tried ifthenelse on Query transform, no luck.

I have looked up all the Q&A and forums could not find a solution, please suggest. Thank you.