From: | "Rodolfo J(dot) Paiz" <rpaiz(at)simpaticus(dot)com> |
---|---|
To: | Sean Davis <sdavis2(at)mail(dot)nih(dot)gov> |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: Help with subselect (first time) |
Date: | 2005-02-05 03:40:29 |
Message-ID: | 1107574829.5202.8.camel@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
On Fri, 2005-02-04 at 20:43 -0500, Sean Davis wrote:
> If these are two tables, called A and B, then doing:
>
> select B.month,days,flts from A,B where A.month=B.month;
>
> will give you your table. If you need all "months", then using:
>
> select B.month,days,flts from B left outer join A on A.month=B.month;
>
The two "tables" shown above are result sets to which I have a handle.
It is my understanding that I can treat them as tables (albeit temporary
ones) until they are released. Is that understanding incorrect?
Getting all the months listed is *exactly* what I want. I'll try your
query a bit later, thanks.
> As for SQL, there are numerous websites (do a google search for SQL
> tutorial) to learn how to do joins as well as many books, several of which
> are online. The postgresql documentation has a tutorial section that
> includes links to a couple of books.
>
Yup, still working through so much documentation it makes my head spin.
I've been reading a good hour a day, and a couple of times substantially
more than that, since I started this little HTML/PHP/PEAR/PGSQL project.
That's why I usually include a phrase like "answers or pointers to
relevent docs welcome". Sometimes I haven't yet gotten to the point of
knowing which doc to read. Then a URL does wonders for me... RTFM is so
much easier when you find the FM. :-)
Cheers,
--
Rodolfo J. Paiz <rpaiz(at)simpaticus(dot)com>
From | Date | Subject | |
---|---|---|---|
Next Message | Jorge Pérez | 2005-02-05 04:01:55 | OLE DB |
Previous Message | Sean Davis | 2005-02-05 01:43:35 | Re: Help with subselect (first time) |