problem with LIKE predicate and wildcards

From: Steve Maring <smaring(at)gte-es(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: problem with LIKE predicate and wildcards
Date: 1998-08-20 13:50:28
Message-ID: 35DC29A3.92801C6E@gte-es.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gte-es(dot)com
Tampa, FL USA

Browse pgsql-sql by date

  From Date Subject
Next Message k_ogorman 1998-08-20 14:12:42 CHECK and IN (Sets in general) - What's the story?
Previous Message G. Anthony Reina 1998-08-19 16:58:31 Appending arrays in a table