We use an e-com package that, unfortunately, adds multiple users under the same email address. We run a mailing every week that depends upon the 'mailing' column (yes/no datatype) of the user record to determine whether to mail or not for a given user. I have to run a SQL query using CF that will eliminate multiples 'yes' checkboxes for users with multiple instances of their email address.
The column of each user record that specifies whether they will receive the mailing or not is called 'mailing' in the 'users' table. The email address column (also in the 'users' table) is called 'email'.
What is the SQL for a query that will deselect all but one 'mailing' checkbox for all users with multiple instances of their email address if more than one are checked? The query must not 'check' the mailing column if it is not already checked at least once.
The column of each user record that specifies whether they will receive the mailing or not is called 'mailing' in the 'users' table. The email address column (also in the 'users' table) is called 'email'.
What is the SQL for a query that will deselect all but one 'mailing' checkbox for all users with multiple instances of their email address if more than one are checked? The query must not 'check' the mailing column if it is not already checked at least once.