Consider the following scenario:
In this scenario, the SQL statement is parsed as follows:
Notice that the equal sign (=) in the Less Than or Equal To operator (<=) is missing from the SQL statement. This problem also occurs when the operator is Greater Than or Equal To (>=).
Note This same problem occurs in Microsoft SQL Server Management Studio 2008 and Microsoft SQL Server Management Studio 2008 R2.
- You create a database project by using Microsoft Visual Studio 2008.
- You connect to a database and then add a new query.
- You type an SQL statement that resembles the following in the SQL pane:
SELECT ‘<column 1>’ FROM ‘<table>’ WHERE @parameter <= ‘<column 2>’
- You move the cursor out of the SQL pane to parse the statement.
In this scenario, the SQL statement is parsed as follows:
SELECT ‘<column 1>’ FROM ‘<table>’ WHERE (‘<column 2>’ > @parameter)
Notice that the equal sign (=) in the Less Than or Equal To operator (<=) is missing from the SQL statement. This problem also occurs when the operator is Greater Than or Equal To (>=).
Note This same problem occurs in Microsoft SQL Server Management Studio 2008 and Microsoft SQL Server Management Studio 2008 R2.