Send Mail to Particular Mail id if Any employer of the organisation has Birthday on daily basis

  • Hello, techies, I have a table in my database named HR_Employee_Data, which has everything about particular employees like his/her first name, last name, designation, department, ctc, dub and so on. I want to create a system generated mail which send mail to the HR head of my company and some other person about which person has a birthday on a particular day including his/her name, department and birthday.

  • sunilchand - Wednesday, May 16, 2018 3:54 AM

    Hello, techies, I have a table in my database named HR_Employee_Data, which has everything about particular employees like his/her first name, last name, designation, department, ctc, dub and so on. I want to create a system generated mail which send mail to the HR head of my company and some other person about which person has a birthday on a particular day including his/her name, department and birthday.

    And what is your question?  What have you tried?  Have you searched the internet for "SQL Server send e-mail" ?   Have you spoken to your DBA(s?) about sending e-mail from SQL Server?

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

  • Also, I *hate* when people celebrate my birthday at work. I just want to work with people, I don't have any desire to get to know them better or spend time outside of work with them. My time is my time, it's none of your business what I'm doing or if there are important events happening unless I tell you specifically.

    My point being, there may be people who don't like it. Are you being requested to do this, or are you doing it because you think it'd be fun?

    -------------------------------------------------------------------------------------------------------------------------------------
    Please follow Best Practices For Posting On Forums to receive quicker and higher quality responses

  • sunilchand - Wednesday, May 16, 2018 3:54 AM

    Hello, techies, I have a table in my database named HR_Employee_Data, which has everything about particular employees like his/her first name, last name, designation, department, ctc, dub and so on. I want to create a system generated mail which send mail to the HR head of my company and some other person about which person has a birthday on a particular day including his/her name, department and birthday.

    The part about sending this information to "some other person" bothers me.  Why?  What business is it of theirs whose birthday is when?  Doesn't the class as Personally Identifiable Information?  Does this fall foul of GDPR or the data protection act, or other non-appropriate / non-approved uses of personal information?

    Thomas Rushton
    blog: https://thelonedba.wordpress.com

  • ThomasRushton - Wednesday, May 16, 2018 6:54 AM

    sunilchand - Wednesday, May 16, 2018 3:54 AM

    Hello, techies, I have a table in my database named HR_Employee_Data, which has everything about particular employees like his/her first name, last name, designation, department, ctc, dub and so on. I want to create a system generated mail which send mail to the HR head of my company and some other person about which person has a birthday on a particular day including his/her name, department and birthday.

    The part about sending this information to "some other person" bothers me.  Why?  What business is it of theirs whose birthday is when?  Doesn't the class as Personally Identifiable Information?  Does this fall foul of GDPR or the data protection act, or other non-appropriate / non-approved uses of personal information?

    True dat!  A lot of companies use birthday as a confirmation of your credentials and it shouldn't be overlooked as a PII issue.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • ThomasRushton - Wednesday, May 16, 2018 6:54 AM

    sunilchand - Wednesday, May 16, 2018 3:54 AM

    Hello, techies, I have a table in my database named HR_Employee_Data, which has everything about particular employees like his/her first name, last name, designation, department, ctc, dub and so on. I want to create a system generated mail which send mail to the HR head of my company and some other person about which person has a birthday on a particular day including his/her name, department and birthday.

    The part about sending this information to "some other person" bothers me.  Why?  What business is it of theirs whose birthday is when?  Doesn't the class as Personally Identifiable Information?  Does this fall foul of GDPR or the data protection act, or other non-appropriate / non-approved uses of personal information?

    Agreed. Also I would HATE to get an insincere card or email from the CEO/HR on my birthday. It's totally meaningless.

    Additionally, a lot of people won't want the year of their birth to be public knowledge. Where I work for example, managers are not privy to an employee's age, which is as it should be; they don't need to be That's what HR is for. So please be aware that many people wouldn't want this information to be distributed. I'd personally be somewhere on the spectrum between bemused and livid if it happened to me, depending on the level of the data breach (as I would see it).

  • Beatrix Kiddo - Wednesday, May 16, 2018 9:22 AM

    ThomasRushton - Wednesday, May 16, 2018 6:54 AM

    sunilchand - Wednesday, May 16, 2018 3:54 AM

    Hello, techies, I have a table in my database named HR_Employee_Data, which has everything about particular employees like his/her first name, last name, designation, department, ctc, dub and so on. I want to create a system generated mail which send mail to the HR head of my company and some other person about which person has a birthday on a particular day including his/her name, department and birthday.

    The part about sending this information to "some other person" bothers me.  Why?  What business is it of theirs whose birthday is when?  Doesn't the class as Personally Identifiable Information?  Does this fall foul of GDPR or the data protection act, or other non-appropriate / non-approved uses of personal information?

    Agreed. Also I would HATE to get an insincere card or email from the CEO/HR on my birthday. It's totally meaningless.

    Additionally, a lot of people won't want the year of their birth to be public knowledge. Where I work for example, managers are not privy to an employee's age, which is as it should be; they don't need to be That's what HR is for. So please be aware that many people wouldn't want this information to be distributed. I'd personally be somewhere on the spectrum between bemused and livid if it happened to me, depending on the level of the data breach (as I would see it).

    <basks in the glow of anti-birthday sentiment>  I used to change my birthday (and some friends' birthdays) who felt the same way on the dept spreadsheet so it was always about six weeks ago, and didn't even get swept up in the "everyone with a birthday this month" parties.

    -------------------------------------------------------------------------------------------------------------------------------------
    Please follow Best Practices For Posting On Forums to receive quicker and higher quality responses

  • Beatrix Kiddo - Wednesday, May 16, 2018 9:22 AM

    Agreed. Also I would HATE to get an insincere card or email from the CEO/HR on my birthday. It's totally meaningless.

    Ooooo.,. don't get me started there.  The way some CEOs do it, it's not totally meaningless.  It's much more thoughtless, arrogant, and clueless than that.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • sgmunson - Wednesday, May 16, 2018 6:31 AM

    sunilchand - Wednesday, May 16, 2018 3:54 AM

    Hello, techies, I have a table in my database named HR_Employee_Data, which has everything about particular employees like his/her first name, last name, designation, department, ctc, dub and so on. I want to create a system generated mail which send mail to the HR head of my company and some other person about which person has a birthday on a particular day including his/her name, department and birthday.

    And what is your question?  What have you tried?  Have you searched the internet for "SQL Server send e-mail" ?   Have you spoken to your DBA(s?) about sending e-mail from SQL Server?

    I just wanted to know .what "select" statement would have been. Mail server is already configured.  For example select empname,dob from HR_Employee_Data
    where DATEPART(MONTH,DOB)=DATEPART(MONTH,Getdate())
    and DATEPART(DAY,DOB)=DATEPART(DAY,Getdate()) and Resign=0

  • ThomasRushton - Wednesday, May 16, 2018 6:54 AM

    sunilchand - Wednesday, May 16, 2018 3:54 AM

    Hello, techies, I have a table in my database named HR_Employee_Data, which has everything about particular employees like his/her first name, last name, designation, department, ctc, dub and so on. I want to create a system generated mail which send mail to the HR head of my company and some other person about which person has a birthday on a particular day including his/her name, department and birthday.

    The part about sending this information to "some other person" bothers me.  Why?  What business is it of theirs whose birthday is when?  Doesn't the class as Personally Identifiable Information?  Does this fall foul of GDPR or the data protection act, or other non-appropriate / non-approved uses of personal information?

    Agree with you !! But  This information isn't that sensitive as you are thinking .. "Some other person" in this context just refer to some eminent personnel of organisation who just want to present some kind gifts or well wishes secretly to particular individual who has birthday on that particular day.

  • jonathan.crawford - Wednesday, May 16, 2018 6:46 AM

    Also, I *hate* when people celebrate my birthday at work. I just want to work with people, I don't have any desire to get to know them better or spend time outside of work with them. My time is my time, it's none of your business what I'm doing or if there are important events happening unless I tell you specifically.

    My point being, there may be people who don't like it. Are you being requested to do this, or are you doing it because you think it'd be fun?

    Why would i do it for fun ?? my head of department asking me to do so .

  • sunilchand - Thursday, May 17, 2018 12:27 AM

    Why would i do it for fun ?? my head of department asking me to do so .

    I do lots of things for fun, then find a relevant business problem to use it on.

    -------------------------------------------------------------------------------------------------------------------------------------
    Please follow Best Practices For Posting On Forums to receive quicker and higher quality responses

  • sunilchand - Wednesday, May 16, 2018 11:17 PM

    ThomasRushton - Wednesday, May 16, 2018 6:54 AM

    sunilchand - Wednesday, May 16, 2018 3:54 AM

    Hello, techies, I have a table in my database named HR_Employee_Data, which has everything about particular employees like his/her first name, last name, designation, department, ctc, dub and so on. I want to create a system generated mail which send mail to the HR head of my company and some other person about which person has a birthday on a particular day including his/her name, department and birthday.

    The part about sending this information to "some other person" bothers me.  Why?  What business is it of theirs whose birthday is when?  Doesn't the class as Personally Identifiable Information?  Does this fall foul of GDPR or the data protection act, or other non-appropriate / non-approved uses of personal information?

    Agree with you !! But  This information isn't that sensitive as you are thinking .. "Some other person" in this context just refer to some eminent personnel of organisation who just want to present some kind gifts or well wishes secretly to particular individual who has birthday on that particular day.

    Secretly! That's loads worse.

  • sunilchand - Wednesday, May 16, 2018 11:17 PM

    ThomasRushton - Wednesday, May 16, 2018 6:54 AM

    sunilchand - Wednesday, May 16, 2018 3:54 AM

    Hello, techies, I have a table in my database named HR_Employee_Data, which has everything about particular employees like his/her first name, last name, designation, department, ctc, dub and so on. I want to create a system generated mail which send mail to the HR head of my company and some other person about which person has a birthday on a particular day including his/her name, department and birthday.

    The part about sending this information to "some other person" bothers me.  Why?  What business is it of theirs whose birthday is when?  Doesn't the class as Personally Identifiable Information?  Does this fall foul of GDPR or the data protection act, or other non-appropriate / non-approved uses of personal information?

    Agree with you !! But  This information isn't that sensitive as you are thinking .. "Some other person" in this context just refer to some eminent personnel of organisation who just want to present some kind gifts or well wishes secretly to particular individual who has birthday on that particular day.

    Understood about the trivial nature of what you're trying to accomplish but, what people are trying to warn you about (and you should bring it up to someone of non-trivial importance) is that if you have access to such personnel information, who else does?  That's the real problem people are talking about here.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • jonathan.crawford - Thursday, May 17, 2018 7:56 AM

    sunilchand - Thursday, May 17, 2018 12:27 AM

    Why would i do it for fun ?? my head of department asking me to do so .

    I do lots of things for fun, then find a relevant business problem to use it on.

    +1000000!!!  Heh... Preach it, brother! 😀  There's no better time to learn something new than when you're NOT under pressure to do it.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 15 posts - 1 through 15 (of 15 total)

You must be logged in to reply to this topic. Login to reply