SQL WHERE


SQL WHERE 

WHERE
(TVE.Close_Date >= CONVERT(VARCHAR(10),REPLACE(CONVERT (date, GETDATE()),'/',''))  or 0=1 )
--AND Comp_Cd LIKE @CompCd
AND (LEN(@ZoCd)= 0  
     OR zo.Z_O in  (Select Myvalues from dbo.My_split(@ZoCd,',') ))
AND   (LEN(@StrAssCd)=0
    OR TAS.Asset_Cd in (Select Myvalues from dbo.My_split(@StrAssCd,',') ))
AND (LEN('2')= 0
     OR  TAS.Upkeep_Cal_Type='2')
AND   TVE.Vender_Name LIKE @StrNm

張貼留言

0 留言