Re: Basic Query Question

From: Bret Fledderjohn <freelancer317(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Basic Query Question
Date: 2011-12-08 03:44:40
Message-ID: CAKxkEFZ6RscvPyev=dmsD5CYHEij7-vS_0CHdvRdr9gSSoFREQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On 7 December 2011 16:58, Jude Lucien <jlucien(at)gmail(dot)com> wrote:

> This is it. There are other instances of bike_id in the booking
> database that have different booking dates.
>
> I can find bike_id's that match my specified booking date, but then I
> need to run a second query to find the bike_id's that are not booked
> on that date.
>
> Is there any way to join the two queries into one?
>

UNION[ALL] See this
http://www.postgresql.org/docs/9.0/interactive/queries-union.html

> Thanks for all the help so far.
>

- Bret
____________________________________________
"Why should I fret in microcosmic bonds
That chafe the spirit, and the mind repress,
When through the clouds gleam beckoning beyonds
Where shining vistas mock man's littleness?"
- H.P. Lovecraft, "Phaeton" (1918)

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Jude Lucien 2011-12-08 11:15:10 Re: Basic Query Question
Previous Message Jude Lucien 2011-12-07 21:58:09 Re: Basic Query Question