Re: trying to pattern match to a value contained in a column - Mailing list pgsql-sql

From Peter Eisentraut
Subject Re: trying to pattern match to a value contained in a column
Date
Msg-id Pine.LNX.4.30.0012072238000.780-100000@peter.localdomain
Whole thread Raw
In response to trying to pattern match to a value contained in a column  (Beth Gatewood <bethg@mbt.washington.edu>)
List pgsql-sql
Beth Gatewood writes:

> So-If I had a table where I had LONG_NAME and ABBR as attributes.
>
> I want something like
>
> SELECT whatever FROM my_table WHERE long_name LIKE '%[the value of ABBR
> in that row]%';

SELECT whatever FROM my_table a, my_table b WHERE a.long_name like (b.abbr || '%');

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/



pgsql-sql by date:

Previous
From: "Francis Solomon"
Date:
Subject: RE: trying to pattern match to a value contained in a column
Next
From: Beth Gatewood
Date:
Subject: Re: trying to pattern match to a value contained in a column