Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query: Condense Sql based on parameter values #15893

Open
smitpatel opened this issue Jun 1, 2019 · 3 comments
Open

Query: Condense Sql based on parameter values #15893

smitpatel opened this issue Jun 1, 2019 · 3 comments

Comments

@smitpatel
Copy link
Contributor

No description provided.

@AndriySvyryd
Copy link
Member

@smitpatel Can you give an example? Is this like short-circuiting?

@smitpatel
Copy link
Contributor Author

            AssertSql(
                @"@__p_0='ALFKI' (Size = 5)

SELECT TOP(2) [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
FROM [Customers] AS [c]
WHERE ([c].[CustomerID] = @__p_0) AND @__p_0 IS NOT NULL");

Remove @__p_0 IS NOT NULL term of it is already not null.

@smitpatel
Copy link
Contributor Author

@maumar - This is probably done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants