Is there a limit to the complexity of a query that can be handled by
database mail?
thanks
Adam
Hi
"Adam Clark" wrote:
> Is there a limit to the complexity of a query that can be handled by
> database mail?
> thanks
> Adam
>
Complexity should not be an issue although if it is a particularly complex
statement I would create a stored procedure. The query parameter is
nvarchar(max) which is 2^31 bytes and probably also be constrained by the
batch size which is 65,536 * Network Packet Size. If you produce large
amounts of output you will be constrained by the MaxFileSize, also you SMTP
relay/server may have limits for total size of the message or attachments.
Is there any particular instance where you have had problems with this?
John
Showing posts with label mail. Show all posts
Showing posts with label mail. Show all posts
Monday, March 26, 2012
more database mail
more database mail
Is there a limit to the complexity of a query that can be handled by
database mail?
thanks
AdamHi
"Adam Clark" wrote:
> Is there a limit to the complexity of a query that can be handled by
> database mail?
> thanks
> Adam
>
Complexity should not be an issue although if it is a particularly complex
statement I would create a stored procedure. The query parameter is
nvarchar(max) which is 2^31 bytes and probably also be constrained by the
batch size which is 65,536 * Network Packet Size. If you produce large
amounts of output you will be constrained by the MaxFileSize, also you SMTP
relay/server may have limits for total size of the message or attachments.
Is there any particular instance where you have had problems with this?
John
database mail?
thanks
AdamHi
"Adam Clark" wrote:
> Is there a limit to the complexity of a query that can be handled by
> database mail?
> thanks
> Adam
>
Complexity should not be an issue although if it is a particularly complex
statement I would create a stored procedure. The query parameter is
nvarchar(max) which is 2^31 bytes and probably also be constrained by the
batch size which is 65,536 * Network Packet Size. If you produce large
amounts of output you will be constrained by the MaxFileSize, also you SMTP
relay/server may have limits for total size of the message or attachments.
Is there any particular instance where you have had problems with this?
John
more database mail
Is there a limit to the complexity of a query that can be handled by
database mail?
thanks
AdamHi
"Adam Clark" wrote:
> Is there a limit to the complexity of a query that can be handled by
> database mail?
> thanks
> Adam
>
Complexity should not be an issue although if it is a particularly complex
statement I would create a stored procedure. The query parameter is
nvarchar(max) which is 2^31 bytes and probably also be constrained by the
batch size which is 65,536 * Network Packet Size. If you produce large
amounts of output you will be constrained by the MaxFileSize, also you SMTP
relay/server may have limits for total size of the message or attachments.
Is there any particular instance where you have had problems with this?
John
database mail?
thanks
AdamHi
"Adam Clark" wrote:
> Is there a limit to the complexity of a query that can be handled by
> database mail?
> thanks
> Adam
>
Complexity should not be an issue although if it is a particularly complex
statement I would create a stored procedure. The query parameter is
nvarchar(max) which is 2^31 bytes and probably also be constrained by the
batch size which is 65,536 * Network Packet Size. If you produce large
amounts of output you will be constrained by the MaxFileSize, also you SMTP
relay/server may have limits for total size of the message or attachments.
Is there any particular instance where you have had problems with this?
John
More About SQL Mail
Dear Surajits,
Thanks for teach me the method of sending query result via SQL mail. But I
want to ask that if I want today date on the Subject, how can I perform this
?
i.e. @.Subject = 'Summary for the date of ' + GetDate() <= Can I write like
this ?
Thanks for concern.
You can't call the GETDATE() function in the proc execution. Bus you can declare a variable and
construct the subject into that variable (including today's date) and then pass that variable as a
parameter for subject in the xp_sendmail call.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Devil Garfield" <DevilGarfield@.discussions.microsoft.com> wrote in message
news:6F8F593F-C69B-467E-9BFF-276096853050@.microsoft.com...
> Dear Surajits,
> Thanks for teach me the method of sending query result via SQL mail. But I
> want to ask that if I want today date on the Subject, how can I perform this
> ?
> i.e. @.Subject = 'Summary for the date of ' + GetDate() <= Can I write like
> this ?
> Thanks for concern.
sql
Thanks for teach me the method of sending query result via SQL mail. But I
want to ask that if I want today date on the Subject, how can I perform this
?
i.e. @.Subject = 'Summary for the date of ' + GetDate() <= Can I write like
this ?
Thanks for concern.
You can't call the GETDATE() function in the proc execution. Bus you can declare a variable and
construct the subject into that variable (including today's date) and then pass that variable as a
parameter for subject in the xp_sendmail call.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Devil Garfield" <DevilGarfield@.discussions.microsoft.com> wrote in message
news:6F8F593F-C69B-467E-9BFF-276096853050@.microsoft.com...
> Dear Surajits,
> Thanks for teach me the method of sending query result via SQL mail. But I
> want to ask that if I want today date on the Subject, how can I perform this
> ?
> i.e. @.Subject = 'Summary for the date of ' + GetDate() <= Can I write like
> this ?
> Thanks for concern.
sql
More About SQL Mail
Dear Surajits,
Thanks for teach me the method of sending query result via SQL mail. But I
want to ask that if I want today date on the Subject, how can I perform this
?
i.e. @.Subject = 'Summary for the date of ' + GetDate() <= Can I write like
this '
Thanks for concern.You can't call the GETDATE() function in the proc execution. Bus you can dec
lare a variable and
construct the subject into that variable (including today's date) and then p
XXX that variable as a
parameter for subject in the xp_sendmail call.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Devil Garfield" <DevilGarfield@.discussions.microsoft.com> wrote in message
news:6F8F593F-C69B-467E-9BFF-276096853050@.microsoft.com...
> Dear Surajits,
> Thanks for teach me the method of sending query result via SQL mail. But I
> want to ask that if I want today date on the Subject, how can I perform th
is
> ?
> i.e. @.Subject = 'Summary for the date of ' + GetDate() <= Can I write like
> this '
> Thanks for concern.
Thanks for teach me the method of sending query result via SQL mail. But I
want to ask that if I want today date on the Subject, how can I perform this
?
i.e. @.Subject = 'Summary for the date of ' + GetDate() <= Can I write like
this '
Thanks for concern.You can't call the GETDATE() function in the proc execution. Bus you can dec
lare a variable and
construct the subject into that variable (including today's date) and then p
XXX that variable as a
parameter for subject in the xp_sendmail call.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Devil Garfield" <DevilGarfield@.discussions.microsoft.com> wrote in message
news:6F8F593F-C69B-467E-9BFF-276096853050@.microsoft.com...
> Dear Surajits,
> Thanks for teach me the method of sending query result via SQL mail. But I
> want to ask that if I want today date on the Subject, how can I perform th
is
> ?
> i.e. @.Subject = 'Summary for the date of ' + GetDate() <= Can I write like
> this '
> Thanks for concern.
More About SQL Mail
Dear Surajits,
Thanks for teach me the method of sending query result via SQL mail. But I
want to ask that if I want today date on the Subject, how can I perform this
?
i.e. @.Subject = 'Summary for the date of ' + GetDate() <= Can I write like
this '
Thanks for concern.You can't call the GETDATE() function in the proc execution. Bus you can declare a variable and
construct the subject into that variable (including today's date) and then pass that variable as a
parameter for subject in the xp_sendmail call.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Devil Garfield" <DevilGarfield@.discussions.microsoft.com> wrote in message
news:6F8F593F-C69B-467E-9BFF-276096853050@.microsoft.com...
> Dear Surajits,
> Thanks for teach me the method of sending query result via SQL mail. But I
> want to ask that if I want today date on the Subject, how can I perform this
> ?
> i.e. @.Subject = 'Summary for the date of ' + GetDate() <= Can I write like
> this '
> Thanks for concern.
Thanks for teach me the method of sending query result via SQL mail. But I
want to ask that if I want today date on the Subject, how can I perform this
?
i.e. @.Subject = 'Summary for the date of ' + GetDate() <= Can I write like
this '
Thanks for concern.You can't call the GETDATE() function in the proc execution. Bus you can declare a variable and
construct the subject into that variable (including today's date) and then pass that variable as a
parameter for subject in the xp_sendmail call.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Devil Garfield" <DevilGarfield@.discussions.microsoft.com> wrote in message
news:6F8F593F-C69B-467E-9BFF-276096853050@.microsoft.com...
> Dear Surajits,
> Thanks for teach me the method of sending query result via SQL mail. But I
> want to ask that if I want today date on the Subject, how can I perform this
> ?
> i.e. @.Subject = 'Summary for the date of ' + GetDate() <= Can I write like
> this '
> Thanks for concern.
Subscribe to:
Posts (Atom)