SE开发者_StackOverflowLECT SUBSTRING(datapath,1,5)
FROM batchinfo
WHERE rowid IN (select *
from qvalues
where rowid in (select rowid
from batchinfo
where datapath like '%thc%'))
GROUP BY SUBSTRING(datapath, 1, 5)
HAVING COUNT(*) > 1
I am getting this error
Msg 116, Level 16, State 1, Line 3 Only one expression can be specified in the select list when the subquery is not introduced with EXISTS.
Does anyone know what am I doing wrong?
...where rowid in (select * from qvalues...
I'm guessing the *
there is an issue. Specify the specific column from qvalues
that rowid
should be compared with (as you do in your second subselect); as it is, you're telling SQL Server to compare rowid
to a complete row.
精彩评论