LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (June 2008, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Sat, 7 Jun 2008 11:00:46 -0500
Reply-To:   sudip chatterjee <sudip.memphis@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   sudip chatterjee <sudip.memphis@GMAIL.COM>
Subject:   Re: Proc SQL & Space Problem
Comments:   To: "Howard Schreier <hs AT dc-sug DOT org>" <schreier.junk.mail@gmail.com>
In-Reply-To:   <200806071319.m57Al9L2020653@malibu.cc.uga.edu>
Content-Type:   text/plain; charset=ISO-8859-1

Yeah,

I did that, the fact is I had to join two times, while in 1 statement it was showing error.

Thank you

On Sat, Jun 7, 2008 at 8:19 AM, Howard Schreier <hs AT dc-sug DOT org> <schreier.junk.mail@gmail.com> wrote: > On Fri, 6 Jun 2008 21:54:39 -0500, sudip chatterjee > <sudip.memphis@GMAIL.COM> wrote: > >>Yeas I think so >> >> actually I have 4 tables each tables has place_id and year >> >> say table A has >>place_id year a1 a2 a3 >> 1 1950 1 1 1 >> 1 1951 1 2 1 >> >> table B has >> place_id year x1 x2 x3 >> 1 1950 23 22 11 >> 1 1951 11 22 11 >> >> table C has >>place_id year z1 z2 z3 >>1 1950 0.5 0.6 0.7 >>1 1951 0.2 0.4 0.7 >> >> >> table D has >>place_d year a b c d .... >> 1 1950 1 1 1 1 >> 1 1951 1 1 1 1 >> >> I was trying to join these 4 tables >> >> Create table final as >> >> SELECT * >> >> FROM (a >> LEFT JOIN b on a.place_id =b.place_id) as First left join (c >>RIGHT JOIN d ON c.place_id = >> d.place_id) ON First.place_id = d.place_id; >> >> >> I think logic is somewhat cool but may be in terms of syntax I am wrong. >> >> Thank You > > The example is a poor one because there are no unmatched rows to exercise > the outer joins. > > Why are you not including conditions like A.YEAR=B.YEAR ? >


Back to: Top of message | Previous page | Main SAS-L page