| From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
|---|---|
| To: | Rich Shepard <rshepard(at)appl-ecosys(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Selecting all variations of job title in a list |
| Date: | 2025-11-25 16:53:15 |
| Message-ID: | 0b511e5a-aadb-4168-9ba4-0b4ae213f920@aklaver.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On 11/25/25 08:33, Rich Shepard wrote:
> Companies can have slightly different titles for the same job; for example
> (using abbreviations). 'Asst Gen Mgr.', 'Env Mgr,', 'Gen Mgr,'. 'Mgr,',
> 'Plant Mgr.'
>
> I want to select all people table rows that contain these varieties. I know
> the 'like' operator uses '%' as a wildcard, but is not accepted in an 'in'
> list.
Something like?:
select 'Env mgr.' ilike ANY(ARRAY['Asst Gen Mgr.', 'Env Mgr.', 'Gen
Mgr.', 'Mgr.','Plant Mgr.']);
t
>
> Is there a way to use a multicharacter wildcard in an 'in' list?
>
> TIA,
>
> Rich
>
>
>
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bernice Southey | 2025-11-25 18:14:57 | Indentation in a patch |
| Previous Message | Ron Johnson | 2025-11-25 16:49:36 | Re: Selecting all variations of job title in a list |