Hi Alteryx Community
I'm trying to replicate the following SQL formula in Alteryx with the formula tool:
WHEN *COLUMN* LIKE '_SET__TEXT______________TEXT' THEN 'OUTPUT '
Is there a way in Alteryx to copy this, taking into consideration where the wildcare (underscores) are and set text or would I have to create 3 substrings and one LEN function linked by an AND function?
Ideally I would be able to use a 'contains', which also allows wildcards, so I could do something like: '*SET**TEXT***************TEXT'
Thanks
Solved! Go to Solution.
Hi Dan, you could use the regex tool, with output method set as "match" on your column with a regular expression like:
.*SET.*TEXT.*TEXT
This exact regex statement may need some work but I hope that points you in a good direction.
Hey @DanN,
I'm no expert on SQL but this definitely sounds like something you would want to use the regex tool to sort:
Would be great to have some example data but I think this is a start:
(.*SET.*TEXT.*TEXT)
Perfect, even tagged the request as Regex, not realising it was exactly what I needed! Great tool, would be really good if you could do multiple expressions per tool, maybe in the future!
Great to hear @DanN ! regex101: build, test, and debug regex Is a great place to test and try regex btw when your getting started.