Link to home
Start Free TrialLog in
Avatar of bibi92
bibi92Flag for France

asked on

An expression of non-boolean type specified in a context where a condition is expected

Hello,

I want to execute :

'IF (select *  from  ['+@SrvAbonne + '].['+ @DbCible + '].dbo.sysobjects where name = ''MSsubscription_agents'')
then
delete from ['+@SrvAbonne + '].['+ @Dbcible + '].dbo.MSreplication_subscriptions
where [publication] like ''' + @publication + ''' end if' :

An expression of non-boolean type specified in a context where a condition is expected, near 'then'. #4145

But I have this error :
An expression of non-boolean type specified in a context where a condition is expected

Thanks

bibi
ASKER CERTIFIED SOLUTION
Avatar of Ephraim Wangoya
Ephraim Wangoya
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bibi92

ASKER

Thanks bibi