The Vertica Forum recently got a makeover! Let us know what you think by filling out this short, anonymous survey.
Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!
Extract substring from string before the first comma

I have a field (called members) that separates names by commas (e.g. Amy, Fred, Susan) - can be several names or just 1 name. I need to grab the first name out of the field and stop at the comma - e.g. Amy - what's the best way to do this in Vertica - I don't have the function Split_Part
Tagged:
0
Answers
A combination of SUBSTR and INSTR might work for you?
Or also: ...
@slc1axj - To @marcothesane post, are you sure you don't have access to the SPLIT_PART function? It has been a built-in function in Vertica for a very long time.
Indeed, I checked. Sorry I missed your point of not having
SPLIT_PART()
available for you.But you can find it as far back as Version 8.1.
Can you tell us your Vertica Version?, or just run a
SELECT VERSION()
, and share your output?