Re: using output of a subselect in LIKE/ILIKE

From: Jeff Eckermann <jeff_eckermann(at)yahoo(dot)com>
To: Rajesh Kumar Mallah <mallah(at)trade-india(dot)com>, PostgResql SQL Mailing List <pgsql-sql(at)postgresql(dot)org>
Subject: Re: using output of a subselect in LIKE/ILIKE
Date: 2002-04-11 14:48:18
Message-ID: 20020411144818.39555.qmail@web20804.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

SELECT branch from branches
where outstation like
(SELECT city from users join
personal_account_details
using(userid) where email='ratans(at)cal(dot)vsnl(dot)com') ||
'%'

--- Rajesh Kumar Mallah <mallah(at)trade-india(dot)com>
wrote:
> Hi folks,
>
> I need to do something like :
>
> SELECT branch from branches
> where outstation like
> SELECT city from users join
> personal_account_details
> using(userid) where email='ratans(at)cal(dot)vsnl(dot)com'
>
> The above does not work for obvious reasons , but
> can anyone help me
> with the right SQL?
>
>
> regds
> Rajesh Kumar Mallah.
>
>
>
>

__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2002-04-11 14:52:30 Re: Problem With A Rule
Previous Message Jeff Eckermann 2002-04-11 14:46:05 Re: Postgresql goes into recovery mode ....