Connecting Tech Pros Worldwide Forums | Help | Site Map

Expression of non-boolean type

Newbie
 
Join Date: Aug 2008
Posts: 1
#1: Aug 20 '08
Hi,

I'm trying to parse this piece of code, and get a non-boolean error, error 4145. any help is appreciated:

IF(SELECT COUNT(*) FROM EVENT)where EXISTS convert(varchar(10)order_id) is not null
RETURN
ELSE


DECLARE @ RED_ID

the error says a where condition is expected near where. I've run the select statement alone,without the if statement, and it is fine.

Thanks for any help.

Lives Here
 
Join Date: Sep 2006
Posts: 12,070
#2: Aug 21 '08

re: Expression of non-boolean type


Quote:

Originally Posted by JRED

Hi,

I'm trying to parse this piece of code, and get a non-boolean error, error 4145. any help is appreciated:

IF(SELECT COUNT(*) FROM EVENT)where EXISTS convert(varchar(10)order_id) is not null
RETURN
ELSE


DECLARE @ RED_ID

the error says a where condition is expected near where. I've run the select statement alone,without the if statement, and it is fine.

Thanks for any help.

Perhaps you did not want to put that closing bracket after EVENT?
Reply