March 12, 2009 at 7:41 am
I have created a Job which executes an SP and emails the results.
Problem
When I get the email, at the top I get:
(25 rows affected)
Followed by the results.
How can I stop this being displayed in the email?
thanks
March 12, 2009 at 7:46 am
Put Set NoCount On
at the top of your SP.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
March 12, 2009 at 7:50 am
Thanks,
Can I put it anywhere at the top?The following is an example of the first few lines:
USE [bookV2]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
ALTER PROCEDURE [dbo].[AllSector]
AS
DECLARE @FROM VARCHAR(12)
DECLARE @TO VARCHAR(12)
DECLARE @TODAY VARCHAR(10)
DECLARE @ENQUIRYDAY VARCHAR(11)
DECLARE @SECTOR VARCHAR(10)
March 12, 2009 at 8:08 am
Typically you put is after the "AS". This is typically what is considered the top of the Stored Procedure, Everything above the ALTER/CREATE PROCEDURE is technically not part of the stored procedure.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
March 12, 2009 at 8:16 am
thanks you Sir
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply