Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
How can i do this in the script.
I have a field and the values in it like this
FieldName
New York - ABC
Atlanta - ABCD
Miami - RF
How can I get a field to be like
Field Name1
New York
Atlanta
Miami
So basically i want to exclude anything after from the dash and over.
Thxs for your help
Alec
I guess I found it but just in case someone else needs a solution I used
SubField(FieldName,'-',1)
Thxs,
Alec
subfield(FieldName, '-', 1)
Load subfield(FieldName, '-', 1) as NewField
Probably something like this would suit you best:
LEFT(FieldName, index(FieldName,' -') ) as FieldName1,
Keep in mind this has a space before the - assuming you have that in your example above. If you don't simply change the inside of the index part to '-'
Hope this helps!
I guess I found it but just in case someone else needs a solution I used
SubField(FieldName,'-',1)
Thxs,
Alec