Re: understanding a nested query

From: Ben <bench(at)silentmedia(dot)com>
To: Rowan <yaardone(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: understanding a nested query
Date: 2008-06-12 23:29:33
Message-ID: Pine.LNX.4.64.0806121627360.3347@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 12 Jun 2008, Rowan wrote:

> I would like to create a nested statement but am unsure of the correct
> syntax. My statement shoudl read someting like
>
> SELECT field1, field2 FROM table WHERE name ILIKE xxx AND ( street
> ILIKE xxxx or street2 ILIKE xxxx)
>
> so basically it needs to match name and either street or street 2..

That's not a subquery, it's just grouping clauses. Your SQL matches your
description of what you want. Maybe you want something else?

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Craig Ringer 2008-06-13 00:54:34 Re: file system level backup
Previous Message Ben 2008-06-12 23:27:09 Re: PostgreSQL Syntax questions