Monday, February 27, 2012

Help - how to select from a comma delimited field ?

Dear SQL,

Lets say I have a field: User_Names

and it can have more than one name
example: "Yovav,John,Shon"

How can I select all the records that has "Yovav" in them ?

I try some like this:
SELECT * FROM User_Table WHERE User_Names IN ('Yovav')

but it only works if the field User_Names only has "Yovav" in it with no extras...

is there some SQL function to tell if string is found in a field ?

Any hope 4 me ?Try

SELECT * FROM User_Table WHERE User_Names LIKE '%Yovav%'|||Thank Q 4 lightning up my night in such times of overSQLing...

finally I can have some sleep :-)

and Thank GOD 4 this forum !!!

No comments:

Post a Comment