hi guys,
I'm using some query to try to display the case below:
table A has 100 rows
result A = 100 rows, comes from table A with all [CP_LOAD%] values
result B = 25 rows, comes from table A which have [CP_LOAD%] > 100
result C = 75 rows, comes from table A which have [CP_LOAD%] <= 100
the query is as below:
SELECT A.[Week]
,A.[DATE]
,A.[Time]
,A.[ACCLOAD]
,A.[NSCAN]
,A.[exchid]
,A.[CP_LOAD%]CP_LOAD
FROM [BLADE_MJK29].[dbo].[dz_cpload] A
WHERE
(
[Week]
,[DATE]
,[Time]
,[ACCLOAD]
,[NSCAN]
,[exchid]
,[CP_LOAD%]
)
NOT IN
(
SELECT
max([CP_LOAD%])CP_LOAD
FROM [BLADE_MJK29].[dbo].[dz_cpload]
group by [Week]
,[DATE]
,[Time]
)
when I run it, it returns an error message like this:
Msg 4145, Level 15, State 1, Line 12
An expression of non-boolean type specified in a context where a condition is expected, near ','.
what does it means?
and how should I fix the script then?