GenerateEqualsNull

Description

Specifies how DataWindows generate =null and <> null expressions in retrieval arguments.

Applies to

All database interfaces

Syntax

GenerateEqualsNull= 'value'

Parameter

Description

value

  • Yes

    Does not change =null or <> null expressions.

  • No

    Converts =null expression to IS NULL, <> null to IS NOT NULL.


Default value

GenerateEqualsNull='No'

Usage

When to use

When a DataWindow retrieves data from tables that contain null columns, most DBMS interfaces expect expressions of the form, IS NULL and IS NOT NULL. Expressions that reference null data as values, such as Where column = NULL, can cause the DBMS to reject the retrieval. For this reason, such expressions in DataWindows are normally converted to the standard ANSI syntax during retrieval.

If your DataWindow retrieves null data from a DBMS that supports expressions of the =null or <> null form, and you want to suppress the conversion of those expressions to standard syntax, you can set the GenerateEqualsNull DBParm to true.

Examples

Consider these two statements:

SELECT "a1"."c1"  FROM "a1"  WHERE "a1"."c2" = :p1
SELECT "a1"."c1"  FROM "a1"  WHERE "a1"."c2" <> :p1

If GenerateEqualsNull is set to false, the statements are generated as:

SELECT "a1"."c1"  FROM "a1"  WHERE "a1"."c2" is null
SELECT "a1"."c1"  FROM "a1"  WHERE "a1"."c2" is not null

If GenerateEqualsNull is set to true, the statements are generated as:

SELECT "a1"."c1"  FROM "a1"  WHERE "a1"."c2" = null
SELECT "a1"."c1"  FROM "a1"  WHERE "a1"."c2" <> null