Wrox Home  
Search P2P Archive for: Go

  Return to Index  

sql_language thread: RE: sql_language digest: June 26, 2000


Message #1 by "Krishna Roopa" <ROOPA@T...> on Tue, 27 Jun 2000 12:42:05 +0530
Hi all,

WE have jobs scheduled to run daily. On Error, we need to get an email to
DBA.
In that case, Do we require a mail client running in the SQL Server machine
and the mail account created in it.

Can we customize the messages in the Messages?  If yes..  How

Thanks and Regards
Krishna Roopa



-----Original Message-----
From: sql language digest [mailto:sql_language@p...]
Sent: Tuesday, June 27, 2000 12:30 PM
To: sql_language digest recipients
Subject: sql_language digest: June 26, 2000


sql language Digest for Monday, June 26, 2000.

1. Integer Paramater Query - Syntax

----------------------------------------------------------------------

Subject: Integer Paramater Query - Syntax
From: "Andrew Watts" <andrew.c.watts@b...>
Date: Sat, 24 Jun 2000 1:20:28
X-Message-Number: 1

I would think this would work - but the SQL check says error near
@toprows.
My non paramter query works fine.

CREATE PROCEDURE usp_processinfo
(
  @toprows  int=null
)
AS
IF  @toprows is not null or @toprows >0
Begin


SELECT TOP  @toprows [processinfo]   FROM [vaultProcess]
where ( LEFT ([processinfo],2)=' u' OR ErrorMessage is not NULL)
order by [EntryDate] DESC,[ErrorMessage]

End

else
Begin

SELECT * FROM [vaultProcess]
where ( LEFT ([processinfo],2)=' u' OR ErrorMessage is not NULL)
order by [EntryDate] DESC,[ErrorMessage]


End


  Return to Index