Re: select in a LIKE?

From: Dave Page <dpage(at)vale-housing(dot)co(dot)uk>
To: "'Arsalan Zaidi'" <azaidi(at)directi(dot)com>, PostgreSQL <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: select in a LIKE?
Date: 2001-10-03 12:56:27
Message-ID: AA30E7BCCA5C1D4E88A231900F8325C00B67@dogbert.vale-housing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Does:

SELECT * FROM users WHERE name LIKE '%' || (SELECT name FROM blah LIMIT 1)

Work?

Regards, Dave.

> -----Original Message-----
> From: Arsalan Zaidi [mailto:azaidi(at)directi(dot)com]
> Sent: 03 October 2001 08:41
> To: PostgreSQL
> Subject: [INTERFACES] select in a LIKE?
>
>
> Hi
>
> Can I construct a LIKE out of a select query? Something like
>
> select * from users where name like '%(select name from blah)'
>
> Currently, this won't work.
>
> --Arsalan
> -------------------------------------------------
> WAR IS PEACE
> FREEDOM IS SLAVERY
> IGNORANCE IS STRENGTH
> --1984
>
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to
> majordomo(at)postgresql(dot)org
>

Browse pgsql-interfaces by date

  From Date Subject
Next Message Darko Prenosil 2001-10-03 17:13:07
Previous Message Arsalan Zaidi 2001-10-03 07:40:43 select in a LIKE?