sql server - Getting 'An Expression of non-boolean type specified in a context where a condition is expected' error using an IIF statement in a WHERE clause -


the iif statement below throwing 'an expression of non-boolean type specified in context condition expected' error.

how return boolean value using iif statement within clause in sql server? tried casting result bit didn't work...

delete assignments     assignedobjecttypeid=@assignedobjecttypeid , assignedobjectid=@assignedobjectid      , targetobjecttypeid=201 , iif(@entity null,1,0) 


Comments

Popular posts from this blog

php - Embed BBCode within itself not working -

three.js - how to load gltf in three JS -

sql server - T-SQL: Access DB objects in same schema without qualifying? -