Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
master_student
Creator III
Creator III

duplicated rows

Hello Guys

My script generate Duplicate row, here 's my script :

Dummy_bscs:

LOAD

ID,

"CUSTCODE",

"DN_NUM",

...

from (qvd);

// after that i get all ID from the first table to get the KIT cooresponding to those ID's

ODBC CONNECT......; //connexion

temp2:

LOAD  ID resident Dummy_bscs;

Dummy_DWH:

LOAD

ID,

KIT

where Exists(ID);

LOAD

'8921603'&id AS ID,

kit_code AS KIT;

SQL SELECT id_number AS id

       , kit_code

FROM

;

join(Dummy_bscs)

LOAD *

Resident Dummy_DWH;

drop table temp2;

I there any thing wrong with my script, Do I have to do a left join?

Here's the result :

Capture.JPG

3 Replies
vinieme12
Champion III
Champion III

which table has ; Code_Bout ? you have multiple values for the same key causing the duplicate rows

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
girirajsinh
Creator III
Creator III

Hi Wiem,

It seems table Dummy_bscs has two CODE_BOUT.. field records for same ID and other fields.

One record where CODE_BOUT... is I34 and another where CODE_BOUT.. is NULL.

Based on the information you have shared, I can suggest following for now,

Put Where clause to eliminate Null from Dummy_bscs table.

Like,

Dummy_bscs:

LOAD

ID,

"CUSTCODE",

"DN_NUM",

...

from (qvd)

WHERE len(trim(CODE_BOUTFIELD))>0;

OR

WHERE not IsNull(CODE_BOUTFIELD);

Please share sample data or application, in case if above suggestion doesn't resolve your case.

Not applicable

Check if your load script generates synthetic keys too.  I had some issues with double rows and after I fixed the load script the problems went away.  Just a thought.