这是我未编译的查询:
Select 1 from dbo.EmailAddresses e
Inner Join Users u On e.UserID = u.UserID
Where LOWER(EmailAddress) = @EmailAddress
And
Case When @For = 1 Then e.JurisdictionID IS NOT NULL When @For = 2 Then e.AccountID IS NOT NULL End
谁能告诉我在没有动态查询的情况下编写此查询的方法,即在字符串中构建查询?