query doesn't return proper value
I have a query as given below:
SELECT DISTINCT(FldStrategyID), FldTradeServerName,FldBaseDir,FldBinaryStartTime
FROM TblOrders Ord,
(SELECT CONCAT(FldStrategyID,'.',FldTradeServerName,'.',FldBaseDir,'.',FldBinaryStartTime) strid
FROM TblOrders
GROUP BY FldStrategyID) as OrderView
WHERE Ord.FldStrategyID !=''
AND OrderView.strid NOT IN (SELECT FldStrategyID FROM TblStrategyMasters WHERE 1)
The problem is that this part is not working:
OrderView.strid NOT IN (SELECT FldStrategy开发者_运维知识库ID FROM TblStrategyMasters WHERE 1)
I think that the quotes(') are missing somewhere.
精彩评论