problem with LIKE predicate and wildcards - Mailing list pgsql-sql

From Steve Maring
Subject problem with LIKE predicate and wildcards
Date
Msg-id 35DC29A3.92801C6E@gte-es.com
Whole thread Raw
List pgsql-sql
The only way I have been able to get the LIKE predicate to work at all
is like this:

SELECT * FROM profiles WHERE lastname LIKE 'Marin%';

returns rows with lastname starting with 'Marin'

I cannot  seem to say:
LIKE '%aring'
LIKE 'Ma%ing'
LIKE '_aring'

Specifically I need to search for rows like this:

SELECT id FROM profiles WHERE id LIKE '_____001';

should return:
TAMP-001
DALL-001
VANC-001

Can someone PLEASE help me.  I'm desparate!  Thanks.

-Steve Maring
smaring@gte-es.com
Tampa, FL  USA


pgsql-sql by date:

Previous
From: "G. Anthony Reina"
Date:
Subject: Appending arrays in a table
Next
From: k_ogorman@kompass.ie
Date:
Subject: CHECK and IN (Sets in general) - What's the story?