
T-SQL script modified to send out emails / msdb.dbo.sp_send_dbmail
- or -
Post a project like this3635
$
- Posted:
- Proposals: 2
- Remote
- #890560
- Completed
Description
Experience Level: Entry
General information for the business: industrial production
Description of requirements/functionality: Hello,
we currently send out Tables by email to a group of employees like:
eMail to sm@ikmaier.com;wm@ikmaier.com;zz@ikmaier.com
Name | eMail | Sample-Data
Steffen Maier | sm@ikmaier.com | 5
Steffen Maier | sm@ikmaier.com | 2
William Maes | wm@ikmaier.com | 3
=====================================================
Using this command:
EXEC msdb.dbo.sp_send_dbmail
@recipients = 'sm@ikmaier.com;wm@ikmaier.com;zz@ikmaier.com',
@query = 'SELECT * FROM TABLE'
Now, we want so send out an eMail to the same people, but only with their data.
Like:
=====================================================
eMail to sm@ikmaier.com:
Steffen Maier | sm@ikmaier.com | 5
Steffen Maier | sm@ikmaier.com | 2
=====================================================
=====================================================
eMail to wm@ikmaier.com:
William Maes | wm@ikmaier.com | 3
=====================================================
=====================================================
No eMail to zz@ikmaier.com, because its not in the table.
=====================================================
Specific technologies required: T-SQL (for Microsoft SQL Server)
OS requirements: Windows
Extra notes:
Description of requirements/functionality: Hello,
we currently send out Tables by email to a group of employees like:
eMail to sm@ikmaier.com;wm@ikmaier.com;zz@ikmaier.com
Name | eMail | Sample-Data
Steffen Maier | sm@ikmaier.com | 5
Steffen Maier | sm@ikmaier.com | 2
William Maes | wm@ikmaier.com | 3
=====================================================
Using this command:
EXEC msdb.dbo.sp_send_dbmail
@recipients = 'sm@ikmaier.com;wm@ikmaier.com;zz@ikmaier.com',
@query = 'SELECT * FROM TABLE'
Now, we want so send out an eMail to the same people, but only with their data.
Like:
=====================================================
eMail to sm@ikmaier.com:
Steffen Maier | sm@ikmaier.com | 5
Steffen Maier | sm@ikmaier.com | 2
=====================================================
=====================================================
eMail to wm@ikmaier.com:
William Maes | wm@ikmaier.com | 3
=====================================================
=====================================================
No eMail to zz@ikmaier.com, because its not in the table.
=====================================================
Specific technologies required: T-SQL (for Microsoft SQL Server)
OS requirements: Windows
Extra notes:

Steffen M.
100% (43)Projects Completed
44
Freelancers worked with
41
Projects awarded
51%
Last project
8 May 2025
Germany
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies