| From: | Ron Johnson <ronljohnsonjr(at)gmail(dot)com> |
|---|---|
| To: | "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Selecting all variations of job title in a list |
| Date: | 2025-11-25 16:49:36 |
| Message-ID: | CANzqJaAJWTjLjn2v3kTcephXx=oo6Wt+k-8wR_P4qbFpA3heyQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Tue, Nov 25, 2025 at 11:33 AM Rich Shepard <rshepard(at)appl-ecosys(dot)com>
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.
>
> Is there a way to use a multicharacter wildcard in an 'in' list?
>
Maybe regex_match() with a bunch of OR clauses.
In bash, I'd do something like:
grep -E ' ^Asst Gen Mgr.*|^Env Mgr.*|^Gen Mgr.*|^Mgr.*|^Plant Mgr..*'
foo.txt
--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Adrian Klaver | 2025-11-25 16:53:15 | Re: Selecting all variations of job title in a list |
| Previous Message | Rich Shepard | 2025-11-25 16:33:07 | Selecting all variations of job title in a list |