GenerateEqualsNull
database parameter
Description
Specifies how DataWindows generate =null and <> null
expressions in retrieval arguments.
Applies to
All database interfaces
Syntax
|
1 |
GenerateEqualsNull= 'value' |
|
Parameter |
Description |
|---|---|
|
value |
|
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:
|
1 2 |
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:
|
1 2 |
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:
|
1 2 |
SELECT "a1"."c1" FROM "a1" WHERE "a1"."c2" = null SELECT "a1"."c1" FROM "a1" WHERE "a1"."c2" <> null |