conceptmgt
IS-IT--Management
Hi
I had a system that works fine in MS SQL 7 and I am converting it to MYSQL. I had a script that removes duplicates below:
strsql = "DELETE FROM EmailAddresses WHERE"
strsql = strsql + " EXISTS ("
strsql = strsql + " SELECT"
strsql = strsql + " NULL"
strsql = strsql + " FROM"
strsql = strsql + " EmailAddresses b"
strsql = strsql + " WHERE"
strsql = strsql + " b.[EmailAddress] = EmailAddresses.[EmailAddress]"
strsql = strsql + " GROUP BY"
strsql = strsql + " b.[EmailAddress]"
strsql = strsql + " HAVING"
strsql = strsql + " EmailAddresses.[EmailAddressid] < MAX(b.[EmailAddressid])"
strsql = strsql + " )"
It won't work on the MYSQL database any ideas?
Thanks
Gary
I had a system that works fine in MS SQL 7 and I am converting it to MYSQL. I had a script that removes duplicates below:
strsql = "DELETE FROM EmailAddresses WHERE"
strsql = strsql + " EXISTS ("
strsql = strsql + " SELECT"
strsql = strsql + " NULL"
strsql = strsql + " FROM"
strsql = strsql + " EmailAddresses b"
strsql = strsql + " WHERE"
strsql = strsql + " b.[EmailAddress] = EmailAddresses.[EmailAddress]"
strsql = strsql + " GROUP BY"
strsql = strsql + " b.[EmailAddress]"
strsql = strsql + " HAVING"
strsql = strsql + " EmailAddresses.[EmailAddressid] < MAX(b.[EmailAddressid])"
strsql = strsql + " )"
It won't work on the MYSQL database any ideas?
Thanks
Gary