Checking if first character is a *-Beast mode

ozarkram
ozarkram ⚪️
edited May 26 in Dataflows

Hi All,

I am trying to flag the rows that have the first character starting with a *...For ex: *SLD 05/11/2022 - I need to flag this 1 ..*SOLD 05/15/2022 -I need to flag this 1 ,1277489 STK#39298.32831 * -I need to flag this 0..can you please let me know how to do this..


Thanks,

Arun

Best Answer

  • MarkSnodgrass
    MarkSnodgrass Portland, Oregon 🥷
    Answer ✓

    If you are only looking at the first character in a string you can use the LEFT function, like this:

     CASE WHEN LEFT(`orderstatus`,1) = '*' THEN 1 ELSE 0 END
    


    **Make sure to <3 any users posts that helped you.
    **Please mark as accepted the ones who solved your issue.

Answers