Search Postgresql Archives

How to use like with a list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi:

 

How can I search on a csv list of values using "like" where each value is to be appended with a wildcarded string?

 

Example:

 

list = 'jo,mo,do,fo'

I want to pull all names from a table with name like..  'jol%' or 'mol%' or'dol%' or 'sol%'

would match "jolly, molly, moleman,dollface, solarboy"

 

notice they all have the same "l%' wildcarded suffix.

 

I'm really not that lazy, just trying to keep this in a simgle query in order to minimize network hits which will reduce overall wallclock performance.  This thing wil be running in a programming loop.

 

Thanks in Advance !


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux