anybody have any idea is wrong with this case when statement...thanks
---------------------------
this is the error i get
Server: Msg 245, Level 16, State 1, Line 2
Syntax error converting the varchar value 'and orders.complexorder = 1' to a column of data type int.
---------------------------
where
0=0 +
CASE 'complex' When 'complex' Then 'and orders.complexorder = 1'
Else ''
End
---------------------------
this is the error i get
Server: Msg 245, Level 16, State 1, Line 2
Syntax error converting the varchar value 'and orders.complexorder = 1' to a column of data type int.
---------------------------
where
0=0 +
CASE 'complex' When 'complex' Then 'and orders.complexorder = 1'
Else ''
End