Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
marcosadlercreutz
Contributor II
Contributor II

Extrange result on Resident Load ordered by

Dear all, i´ll go right into a extrange thing it´s hapenning.

A simple load it´s giving me a headache...

Script:

// First Load

Recursos_tmp:
Load *
FROM [lib://Datos/AMB Maestros\ABM Recursos Humanos*.xls*]
(ooxml, embedded labels, header is 1 lines, table is [ABM Personal]);

// Second load

Recursos_tmp1:
NoConcatenate
Load * Resident Recursos_tmp order by DNI asc, "Fecha Desde" desc;
drop table Recursos_tmp;

 

This script returns null values on field called "DNI"... When i try the same thing without "order by..." the DNI part returns true values...

Any help?

 

After "First Load"

Captura1.JPG

After Second Load

Captura.JPG

Thanks in advance!

Labels (3)
2 Replies
marcus_sommer

Are you sure that you compares the same records?

- Marcus

marcosadlercreutz
Contributor II
Contributor II
Author

@marcus_sommer Thanks for your reply

I think i do...

I have changed my script to this:

Recursos_tmp1:
NoConcatenate
// load date(if(Previous(DNI)=DNI,Previous("Fecha Desde")-1,today())) as Hasta, *;
Load * Resident Recursos_tmp where not IsNull(DNI) order by DNI asc, "Fecha Desde" desc;
drop table Recursos_tmp;

That gives my a correct content of "DNI" field.

I think the fact of having some null values in that field kind of "break" things...

Best regards