Hi i'm trying to use Alteryx to only keep rows where a string field starts with a particular sequence such as the following:
XYZ1
XYZ2
XYZ3
etc.
But i do not want it to keep rows where the string field contains XYZ but XYZ is not first 3 letters.ex:
123XYZ1
twfXYZ2
I think the SQL code is equal to using "XYZ%" but i wasn't able to utilize this in Alteryx. It's probably something simple i'm overlooking. Any chance someone knows how to overcome this?
Thanks for your help!
Solved! Go to Solution.
To clarify, I'm needing this for a formula tool so it's the syntax to write this. Thanks!
Another option is the STARTSWITH() function.
If you ran
STARTSWITH([String_Field],'XYZ')
This will do exactly what you are looking for.
Essentially:
STARTSWITH = SQL LIKE 'XYZ%'
CONTAINS = SQL LIKE '%XYZ%'
ENDSWITH = SQL LIKE '%XYZ'
All suggestions worked great! Thank you for the taking the time to share your knowledge.
Is this possible to us the *startswith* option with multiple fields? Is there succinct method to list multiple starting field values or are limited to Boolean in independent strings?