Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
good afternoon!!!
I would like to help me have a problem using left join
I charge a base having 2,395,771 records and when I make a left join me ofa catalog RECORDS REDUCES I removed leaving only 2,385,500 10,000 records
SOMEONE HAS idea why Mequita many records ????
THANK YOU
CHEERS
ANGEL
buenas tardes!!!
Quisiera que me ayudaran tengo un problema al utilizar left join
yo cargo una base que tiene 2,395,771 registros y cuando yo le hago un left join deun catalogo me DISMINUYE LOS REGISTROS quedando solo 2,385,500 me quita 10,000 registros
ALGUIEN TIENE IDEA DEL POR QUE MEQUITA TANTOS REGISTROS ????
GRACIAS
SALUDOS
Note: Edited by moderator to combine posts.
If you're doing a left join of table B to table A, the new table A will have at least as many records as the pre-join table A and possibly more if there's a 1:N relationship (that is, table B contains two or more records for a given record in table A). Table B may "lose" records if there's no corresponding record in table A since it's a left join, not a right or outer join.
If you're losing records in your table "A," is there a where or keep clause somewhere in the script?
Maybe you used a DISTINCT statement within one or both loadings - even distinct is only applied to one of these loads it will effect the whole loading and therefore the result-table.
- Marcus
Hola, si la tabla A tiene x registros y haces un "left join (A) LOAD ...", la tabla A debería tener al menos el mismo número de registros que antes de hacer el left join, mira si como dice Marcus en alguna tabla estas usando un DISTINCT o tienes alguna condición que esté descartando registros.
Si puedes añadir la parte del script donde cargas la primera tabla y donde haces el left join podría revisarlo.
También puedes verificar que en el log se ve como la 1ª tabla carga los 2.395.771 registros y que al hacer el left join se queda con 2.385.500.