Home Forums SQL Server 2008 T-SQL (SS2K8) ERROR:An expression of non-boolean type specified in a context where a condition is expected RE: ERROR:An expression of non-boolean type specified in a context where a condition is expected

  • Hi,
    I Have very similar problem.When I make case.

    "and (case when c.CustomerSAP='167791' then '668194' else c.CustomerSAP end)

    Its no working. I had error:

    "An expression of non-boolean type specified in a context"

    I'll try that:

    and (case when c.CustomerSAP='167791' then '668194' end)=668194
    But in table didn't change me No 167791 on 668194.

    What can I do? I'll be gratefull for any idea.

    and (case when c.CustomerSAP='167791' then '668194' end)=668194