11-20-2012 11:11 PM
There are four tables which are explicitly joined in a proc sql,can i use three inner joins for the same to get same results
have a little confusion on this.
from ahru as a, dsdf as b,ghdgfs as c,gfgsfs as d
So for the same can i use three inner joins?
Also,bit curious about what is the maximum inner joins we can use?
Your help is needed
11-20-2012 11:36 PM
SQL with inner joins on 4 or more tables is perfectly feasible. You have to be careful that all the joins are stated, to avoid some sort of cartesian product.
In your example you are joining the same table (gfgsfs) twice. If this is intentional note that the columns represented by d.* are the same as those represented by c.*, and SAS will not allow duplicate column names. You can rename them on the fly or as a ddataset option if need be.
Richard in Oz