Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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!

2 Replies
Highlighted
MVP & Luminary
MVP & Luminary

Re: Extrange result on Resident Load ordered by

Are you sure that you compares the same records?

- Marcus

Highlighted
Contributor II
Contributor II

Re: Extrange result on Resident Load ordered by

@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