What is wrong with a sub query that returns multiple columns ?
Posted on 2008-06-26
I have a problem with the following sql code:
SELECT c.WarehouseNumber, c.Row, c.Height, c.ArticleNumber, c.EntryDate, c.State
FROM tblWarehouseContents c
WHERE (c.State = 0) AND (c.WarehouseNumber, c.Row, c.Height) IN
select l.WarehouseNumber, l.Row, l.Height
from tblWarehouseLayout l INNER JOIN tblPalletArticle a
ON l.ArticleNumber = a.ArticleNumber
where (a.ArticleName LIKE '34.0003C' AND l.Status = 0)
When executing it always generates the following error message:
Msg 102, Level 15, State 1, Line 3
Incorrect syntax near ','.
Using only one column works fine.
Any help appreciated.
Thanx in advance.