+1 800 256 3608 (toll-free in North America) or +49 7531 90 60 10| service@combit.com

Problem with NULL values for numbers


(Guest) #1

Hi newsgroup,

I have a table with several columns.
In one column (“col1”) there are numbers which may be NULL sometimes ("(NULL)" more precisely).

My aim is to compare col1 with another number (and later to subtract one from the other).

When I run the program with the report (with col1 = NULL) with:

Cond(Not IsNull(col1), 0, Cond(col1 <= 10, 10, 20))

…I am receiving an error message like “Invalid datatype on the right side of ‘<=’ (string expected)”

So, is col1 with the value NULL a string? If yes: Is there a function which converts strings or numbers to numbers? (Or something like that…)

Burkart


(Guest) #2

The solution is really a “numeric NULL value” as in the following statemnent:

fields.Add(key, “(NULL)”, LlFieldType.Numeric);

The extra parameter “LlFieldType.Numeric” is the main point.

Burkart