Skip to content
Advertisement

Msg 4145, Level 15, State 1, Line 5 An expression of non-boolean type specified in a context where a condition is expected, near ‘ucell’

I am trying to add another column using LEFT JOIN after ON as I want to look join multiple columns

So I tried using some thing like this

and I get this error:

Msg 4145, Level 15, State 1, Line 5
An expression of non-boolean type specified in a context where a condition is expected, near ‘ucell’.

The error must be in this part:

Does anyone have an idea how to solve this?

Advertisement

Answer

This is not valid T-SQL (or at least, will not do what you want):

Ths treats OR SHO.ucell as a separate condition, so the database tries to evaluate it in bolean context, which fails here.

You can use IN instead:

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement