包含单引号的sql

   SELECT @leftPV=SUM(TotalPv) FROM Com_Order WHERE OrderPeriod =@Duration AND MemNumber IN (SELECT MemNumber FROM dbo.Com_Member WHERE MemBinaryList LIKE '%,'+CAST(@leftLeg AS NVARCHAR(256)) + ',%')

 

posted @ 2015-09-25 21:25  美丽的矩阵  阅读(320)  评论(0编辑  收藏  举报