How can I extract a portion of a string using the SLICE function?
Summary:
I want to print only the first 7 characters but using the examples of the slicing funciont I wasn´t been able to do it.
for example in this case: Walmart Veracruz
I only want to print: Walmart
I have tested whit these expression but it did not work
"\~order_header.shipto_name"[slice([:7],len( "\~order_header.shipto_name "))]
"\~order_header.shipto_name"[slice((:7)),len( "\~order_header.shipto_name "))]
"\~order_header.shipto_name"[slice((0:-9)),len( "\~order_header.shipto_name "))]
functions={"slice": slice,("\~order_header.shipto_name"[:7]) {"slice": slice,("\~order_header.shipto_name"[:7]) {"slice": slice,("\~order_header.shipto_name"[:7])}
Content (required):
Tagged:
0