Hi there,
One more problem I need a solution to:
I have uploaded another sample of data, and from this dataset, I need to select records where the 'Constituent ID' field is NOT unique (i.e. where there are 2 or more 'Constituent ID's) AND where at least one record has an empty date in the 'Constituent Specific Attributes Contact Preferences Date' field.
Also, for every 'Constituent ID' that meets this criteria, I want to output ALL the records with that 'Constituent ID' (e.g. if the dataset contains a Constituent ID that is duplicated 5 times, and 1 of the records has a missing date, this record would be selected, and all 5 records would be outputted).
A few examples of returned records from the uploaded dataset would be:
Constituent ID
Constituent Specific Attributes Contact Preferences Import ID
Constituent Specific Attributes Contact Preferences Description
Constituent Specific Attributes Contact Preferences Date 2259 00001-528-0000449513 Email opt out 02/11/2016 2259 00001-528-0000046474 Email opt in 2637 00001-528-0000129918 Email opt in 05/04/2016 2637 00001-528-0000273247 Postal opt out 2637 00001-528-0000273248 Telephone opt out
Again, as I like to work in SQL, if anyone has any ideas, could you type the SQL statement in your solution?
Any help, as always, much appreciated.
Thanks,
Antonio