Re: using output of a subselect in LIKE/ILIKE - Mailing list pgsql-sql

From Jeff Eckermann
Subject Re: using output of a subselect in LIKE/ILIKE
Date
Msg-id 20020411144818.39555.qmail@web20804.mail.yahoo.com
Whole thread Raw
In response to using output of a subselect in LIKE/ILIKE  (Rajesh Kumar Mallah <mallah@trade-india.com>)
List pgsql-sql
SELECT  branch from  branches 
where outstation like 
(SELECT  city from users  join
personal_account_details 
using(userid)  where email='ratans@cal.vsnl.com') ||
'%' 


--- Rajesh Kumar Mallah <mallah@trade-india.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@cal.vsnl.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/


pgsql-sql by date:

Previous
From: Jeff Eckermann
Date:
Subject: Re: Postgresql goes into recovery mode ....
Next
From: Tom Lane
Date:
Subject: Re: Problem With A Rule