Troubleshooting a SQL Statement Containing a Null

Problem: If you use a database other than Sybase, when there is a comparison operator in a definition SQL statement followed by a parameter, for example: "select * from ... where columnA = '@OP["parameterA"=""]'", and the default value of this parameter is set to Null, you do not get the expected results in runtime.

Solution: If you need Null as the default value, define a object/operation and manually write the definition SQL statement, for example, " columnA is null".


Created September 17, 2009. Send feedback on this help topic to Sybase Technical Publications: pubs@sybase.com