Is this possible?
Hey All,
Question... I have a customer that we process orders for who's SKU field is a series of characters followed by a space followed by the product's UPC. I need to export SKU and Qty to send to our warehouse for picking via a csv file... is it possible for me to strip away all of the characters preceding the UPC so that field/column in my csv file has only the UPC?
This customer is not willing to remove these characters but they are willing to replace the space with something like an underscore or dash or another unique character if that will help me strip everything but the UPC away.
Thanks for any help.
Rob J
-
What you are looking for is called substring-after
Q: What does substring-after do?A: Returns the remainder of string1 after string2 occurs in it
Example and how you use it:
substring-after(string1,string2)
get all characters after a slash (/)
Example: substring-after('12/10','/')
Result: '10'
get all characters after a space
Example: substring-after('abcdefg123 193827462723', ' ')
Result: '193827462723'
Hope this helps. -
Thanks Nathan!
Something I just noticed... Some of their SKU fields are only the UPC and some have characters preceding.. Would there be a way to check to see if the field had a space and if so, substring-after and if not then output the field as is? I'm assuming if I substring-after and there is no space, I will get no output?
Please sign in to leave a comment.
Comments
4 comments