12-26-2012 11:24 AM
I am trying to perform a full join (include all matches and non-matches based on two conditions keeping variables from both tables)
I am attempting to join by two conditions becuase "LCODE" in dataset A can be found as 'DCODE1" or "SCODE1" in two different variables in dataset B. I tried to increase buffersize as I read that could possibly resolve- it didnt.
I am getting this error from SAS when trying to perform this join. Can anyone help me? Thank you.
"The execution of this query involves performing one or more Cartesian product joins that can not be optimized."
PROC SQL buffersize=256000;
FROM EOY A FULL JOIN WC B ON
(A.LCODE = B.DCODE1) OR (A.LCODE = B.SCODE1);
12-26-2012 11:33 AM
That message isn't indicating an error .. just that proc sql couldn't optimize the request. Are you getting the desired results?
If not, some example data and desired results from that data would be helpful.
12-26-2012 11:47 AM
Thank you Mr. Tabachneck! I created a table and that resolved the pop up box. Arghhh still trying to learn PROC SQL to join. Been using 'merge' statement and trying to learn joins. Thank you again!