Duplicates in export but not in table

ts3345's profile image ts3345 posted 2 years ago in General Permalink

hey

I have a table with 1.4 mio lines without any duplicates but when I export the table to an "Excel CSV" I get 10-20 duplicates of the last few lines in the created csv file.

p.e. In table bla I get 60000 lines for the actual calender week 27 with this command:

SELECT COUNT(*) FROM bla WHERE cw = 27;

But when I click the table bla, hit "Show all lines" and export the result, the exported csv file has 60020 lines with 20 duplicates.

I found the workaround to create a new empty table with a name that never existed before in the database, p.e. bla123

Then I fill the table with

INSERT INTO bla123 SELECT * FROM bla;

In the last step I export the new created bla123 and have no duplicates anymore at the end (= 60000 lines). But that trick only works once with that new table name. Next time I need to invent another table name and do the same steps again to avoid duplicates in the exported csv.

How can I fix that?

I use version 12.5.0.6677

ts3345's profile image ts3345 posted 2 years ago Permalink

But when I click the table bla, hit "Show all lines" and export the result, the exported csv file has 60020 lines with 20 duplicates.

I ment the table has 1400020 lines with 20 duplicates of the last lines which are from calender week 27 in this example.

ts3345's profile image ts3345 posted 2 years ago Permalink

I ment the table has 1400020 lines with 20 duplicates of the last lines which are from calender week 27 in this example.

Wrong again! I wish I could edit my postings :(

I mean the export, not the table!

The tables bla, bla123, bla321 etc. are always fine without any duplicates.

The export from an existing bla table is always with duplicates while the export of a brand new bla table is always without any duplicates...

ansgar's profile image ansgar posted 2 years ago Permalink

Could it be an external application inserted some rows while you were exporting? That would explain the duplicates.

Please login to leave a reply, or register at first.