02-27-2014 03:00 PM
How can I join to datasets and keep all the variables in dataset1 and from dataset2 only the ones that are not in dataset1.
This tables change all the time so if I do the query and join tables, the next time I do it the ones that where in dataset1 are no longer there and I need to get them from dataset2.
02-27-2014 05:53 PM
Can you share some of the generated code?
It may be as simple as the order of listing your data sets in the join but some example code and input / output would clarify your issue and want.
02-27-2014 05:59 PM
Do you join on all the fields that are match between the two files, or is there a chance that the same fields could differ between tables?
If they're all the same, then try doing a Natural Join, though you may have to code that, instead of using the Query Tool. I'm not sure.
02-28-2014 07:10 AM
I can use SAS code.
I need to join to tables, the columns in table 1 changes all the time and I need to get always all the columns from table 1 and the ones from table to that are not in table 1.
CREATE TABLE WORK.xxx(label="QUERY_FOR_CONTABILIDAD") AS
FROM WORK.QUERY_FOR_CONTABILIDAD_0001 t1
INNER JOIN WORK.COPIA_DE_LISTADO_DE_CUENTAS_CONT t2 ON (t1.Cuenta_contable = t2.CUENTA);
The idea es
I hope this more clear.