Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Line duplication SQL Select


Hello,

I'm extracting a table from SQL and the generated table has duplicated lines. The SQL table has no duplicated lines.

I only running the following script, no table before or after and no join just the database connection before.

Item:

LOAD *;

SQL SELECT *

From MDTestDatabase.SAP.ViewItem;

if i use a ditinct, i have the following results:

- LOAD Distinct *: no duplication

- SQL SELECT Distinct *: duplications

So, duplication is generated by LOAD statement and not SQL query.

Any idea?

Thks

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

I have found the problem.

There are 3 and 000003 as item code and Qlikview change the first in 000003.

Vincen

View solution in original post

4 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Omit the LOAD *; It doesn't do anything, or rather - it isn't supposed to do anything. The Item-table will be created by just executing the SQL SELECT

Weird phenomenon. Are you sure the View isn't populated with too many lines?

Peter

Anonymous
Not applicable
Author

I have found the problem.

There are 3 and 000003 as item code and Qlikview change the first in 000003.

Vincen

rbecher
MVP
MVP

It's hard to believe that SQL SELECT Distinct or LOAD Distinct will give a resultset with duplicate rows. Maybe it's related to an associated table in the model?

Could you upload an example?

- Ralf

Astrato.io Head of R&D
swuehl
MVP
MVP

Use

LOAD

     text(FIELD) as FIELD,

     ...

if you need to distinguish between 3 and 000003