Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Evening,
I'm trying to identify "duplicate" records in my dataset. I am concatenating 3 QVD's into 1 table. The script I'm using is below:
AllActiveAccounts.account,
AllActiveAccounts.agentversion,
AllActiveAccounts.backupdate,
if(AllActiveAccounts.Email='','None', AllActiveAccounts.Email) AS AllActiveAccounts.Email,
if(AllActiveAccounts.Email='','None', AllActiveAccounts.Email) AS lnk_user_email,
AllActiveAccounts.startdate,
AllActiveAccounts.value,
AllActiveAccounts.value AS lnk_asset_name,
'UK' AS AllActiveAccounts.c_Country,
'8.5' AS AllActiveAccounts.c_CBVersion,
Num((Date(Today()))-AllActiveAccounts.backupdate,'#.') AS AllActiveAccounts.c_DaysSinceBackup
I want to identify a duplicate as a record that has the same "AllActiveAccounts.Email" and the same "AllActiveAccounts.value,"
For instance, if the combination of the email aa@bb.com and value "12234" appeared twice in the data set, the number wold be "2"
If there was another record with the email aa@bb.com and the value of 98765 that would appear as "1" despite there being another record with the same email address.
I have tried "Autonumber" but not having much luck.
Can anyone offer any assistance?
Thanks
- load your qvd in a table (I call the table t)
- group by and join in this way to add the dupl field
left join (t)
load
AllActiveAccounts.Email,
AllActiveAccounts.value,
count(AllActiveAccounts.account) as dupl
Resident t
group by
AllActiveAccounts.Email,
AllActiveAccounts.value;
How would I do this without specifying the "email" and "value"? I have about 19,000 records I'm trying to process.
- load your qvd in a table (I call the table t)
- group by and join in this way to add the dupl field
left join (t)
load
AllActiveAccounts.Email,
AllActiveAccounts.value,
count(AllActiveAccounts.account) as dupl
Resident t
group by
AllActiveAccounts.Email,
AllActiveAccounts.value;
Brilliant!!!! Thank you ![]()