Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Net Send when query returns rows

Status
Not open for further replies.

allroy

MIS
Feb 27, 2002
17
CA
Let me begin by letting you know I am a total newbie when it comes to SQL. I fell into this as I am the only tech staff here.

I'm trying to figure out how to do a net send when this query:
SELECT * FROM

WHERE Len(COLUMN) < 11

returns any rows. I have set a job up to run every 5 mins, as we receive an order from our customer every minute.I have to verify that the ID field for them is populating correctly, and would like to be alerted when it isn't. Any guidance is greatly appreciated.
 
if exists (SELECT * FROM

WHERE Len(COLUMN) < 11)
exec master,,xp_cmdshell 'net send me help'


======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top