我想在我的查询中创建case语句时得到一些帮助。CASE WHEN Hotelexpenses between CONVERT(varchar(10), getdate(),121) and convert(varchar(10),DATEADD(mm,6,getdate()),121)
and engagementexpenses between CONVERT(varchar(10), getdate(),121) and convert(varchar(10),DATEADD(mm,6,getdate()),12
我试图根据变量的值添加一个CASE语句: AND ActivityDate >= @startDateParam AND CASE (@orgTeamPK) (USR.[OrganizationalTeamId] LIKE @orgTeamPK OR USR.[OrganizationalTeamId] I