I have a field in my database called “Notes”. It contains a comma delimited list of values.
I want to perform a SELECT Query that only returns the first value in the “Notes” field.
This query would also return additional fields from the database.
for example
SELECT Name, Phone, Notes (only the first value)
FROM Table1
Is this possible, and how do I do it?
You can use
CHARINDEXwithSUBSTRING:Demo
Result
As mentioned in the comments, you should normalize your structure and not have more than one value stored in a single attribute.