Your problem is that if no records exist then @count NULL, not 0.
Try this.
SELECT @Count=coalesce(COUNT(UserName),0) FROM EkSelfAssRpts
WHERE UserName=@UsernameAux AND
FirstName=@FirstNameAux AND Title=@TitleAux
-----Original Message-----
From: Mario Martinez R. [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 18, 2002 12:31 PM
To: CF-Talk
Subject: RecordCount is 0 en Stored Procedure
Hi all:
I got this query in transac-SQL.
I would like to know when the result recorset is 0.
I wrote this tricky code down here but I think is
wrong.
Any ideas??.
Thanks in advance friends.
Mario
SELECT @Count=COUNT(UserName) FROM EkSelfAssRpts
WHERE UserName=@UsernameAux AND
FirstName=@FirstNameAux AND Title=@TitleAux
IF @Count=0
BEGIN
/*Here I write my action*/
END
_________________________________________________________
Do You Yahoo!?
Informacion de Estados Unidos y America Latina, en Yahoo! Noticias.
Visitanos en http://noticias.espanol.yahoo.com
______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists