Nulls in stage variables become 0/empty string in output
Posted: Thu Aug 09, 2007 2:59 am
When I try to set a stage variable to a NULL value using SetNull(), and I use this stage variable in an output derivation for a nullable field, the output becomes 0 (integer field) or an empty string (string field).
For example if I have
- an integer stagevariable svar defined as ''
- two nullable integer outputfields:
- f1: defined as
- f2: defined as
(same expression as for svar).
I would expect the result for both integer fields to be NULL.
However the output for f1=0, for f2 it is NULL.
Can a stage variable not be NULL, or what is my problem?
For example if I have
- an integer stagevariable svar defined as '
Code: Select all
if 1=1 then SetNull() else SetNull()
- two nullable integer outputfields:
- f1: defined as
Code: Select all
svar
Code: Select all
if 1=1 then SetNull() else SetNull()
I would expect the result for both integer fields to be NULL.
However the output for f1=0, for f2 it is NULL.
Can a stage variable not be NULL, or what is my problem?