I have a task that runs daily that copies records from one table to another. In the table I am copying from, the email field does not need to be unique. In the table I am copying to, the email field does need to be unique. The task runs successfully when there is a non-unique email value that is attempted to be copied over, but it omits that record and generates an error that is only visible if you inspect the Task History. Is there any way to automatically send an email when an error like this occurs? Or have some other way of being alerted, rather than checking the Task History each day.
I know that limiting the records being copied to only unique values would be the proper way to handle this, but I have not found a way to select only distinct records by email address - to me, it appears that the DISTINCT option on the Select statement in Tasks applies to the whole record. In my situation, the whole record may not be unique, as in some cases, the rest of the values in the record (other than the email) may not be exactly the same.
I hope that makes sense - and appreciate any help!
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
JayDub
Hi All-
I have a task that runs daily that copies records from one table to another. In the table I am copying from, the email field does not need to be unique. In the table I am copying to, the email field does need to be unique. The task runs successfully when there is a non-unique email value that is attempted to be copied over, but it omits that record and generates an error that is only visible if you inspect the Task History. Is there any way to automatically send an email when an error like this occurs? Or have some other way of being alerted, rather than checking the Task History each day.
I know that limiting the records being copied to only unique values would be the proper way to handle this, but I have not found a way to select only distinct records by email address - to me, it appears that the DISTINCT option on the Select statement in Tasks applies to the whole record. In my situation, the whole record may not be unique, as in some cases, the rest of the values in the record (other than the email) may not be exactly the same.
I hope that makes sense - and appreciate any help!
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.