Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I've fetched the result of a SQL in a table-box. I want to check if there are any duplicate records. How can I do that?
after load table
take primary key into list box
go to list box properties-> Frequency
if it showing more than 1 then duplicates is available.
hope this helps
Hi vawarali,
Sometimes you get duplicate sets of fields in the table but with different primary keys. I would personally write something in the script, as this is much more efficient but if I am doing this in the QVW I would use a chart object rather than a table box to display the number of records.
Use all the fields that you are interested in looking for as duplicates as the dimensions.
Then the expression will be = count(key_field)
or whatever the primary key is.
You can then either sort by the expression field, or set the expression to something like = count(key_field)>1 to list only the duplicates.
Erica
Hello,
Adding further to above count(Key_field) expression gives the total count and count(DISTINCT key_field) gives the distinct count.. try this in any list box.
Thanks