ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

IF ELSE STATEMENT WITH LIKE Condition

kathbanc
8 - Asteroid

Hi! 

 

Please help me, what is the syntax for like in IF ELSE Statement. 

 

IF [SLoc] like 'PA%' THEN '234'
ELSE [SLoc] ENDIF

 

This one is error 

 

 

Thank you 

2 REPLIES 2
gawa
16 - Nebula
16 - Nebula

hi @kathbanc 

StartsWith and/or EndsWith function can be used for equivalent statement to LIKE in SQL query.

 

If you want to match the beginning of words, use StartsWith().

StartsWith([SLoc], "PA")

 Or, If you want to match the end of words, use EndsWith(). 

EndsWith([Sloc], "PA")

 

kathbanc
8 - Asteroid

Thank you @gawa it works!! Thank you so much 

Labels
Top Solution Authors