6 Replies Latest reply: Feb 29, 2012 9:02 AM by Jonathan Love RSS

    Remove leading characters IF

    Jonathan Love

      ltrim(replace(Individual_Item_Number,'77','')) as Dupe I used this to try and identify individual_items where they start with '77%' and return it's non 77 equivalent: Where ind_item = 12345, Dupe is 12345 as it should be. Where ind_item = 7712345, Dupe is 12345 as it should be...however, if ind_item = 1277345, it returns 12345 when I would like it to remain 1277345. I only want it to act if the two left most digits meet the '77' starting criteria.  Thoughts?