Wednesday, February 8, 2012 15:59

Documentum set default attribute value to NULLINT

Tagged with:
Posted by on Saturday, March 21, 2009, 9:00
This news item was posted in Documentum category and has 0 Comments so far.

You can not set integers to null values. The server stores them as 0.

INTEGER

 

——————–

 

 

The server does not store null values for integer attributes, it stores zeros. The DQL query language does contain a keyword NULLINT which you can use in a query, but it translates this into a zero. This can be shown by a simple test.

 

 

Suppose you defined a new type called myType with a repeating integer attribute called rint. Let’s suppose there are no such objects in the docbase, and you create the first one.

 

 

You can append values to the rint attribute using the following DQL:

 

 

update myType objects append rint = 0

 

 

Note that we set the value to zero. Then you can show that the server interprets NULLINT as a zero using the following query:

 

 

 

select rint from myType where any rint is NULLINT

 

 

This will return the value you just appended, the zero.

 

 

 

STRING

 

——————–

 

Similarly, you cannot assign NULLSTRING to a string, but you can query on it.

 

 

IS [NOT] NULLSTRING Determines whether the attribute is assigned a null

 

string.

 

 

 

DATE

 

——————–

 

However, a date can be set to NULLDATE. For example:

 

 

update myType objects append reptime = DATE(‘NULLDATE’)

 

 

If the date is entered as NULLDATE, then the output is the string

 

NULLDATE.

Leave a Reply

You can leave a response, or trackback from your own site.