Re: Help with subselect (first time)
От | Rodolfo J. Paiz |
---|---|
Тема | Re: Help with subselect (first time) |
Дата | |
Msg-id | 1107574829.5202.8.camel@localhost.localdomain обсуждение исходный текст |
Ответ на | Re: Help with subselect (first time) ("Sean Davis" <sdavis2@mail.nih.gov>) |
Ответы |
OLE DB
Re: Help with subselect (first time) |
Список | 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@simpaticus.com>
В списке pgsql-novice по дате отправления: