Remove or set Document Query Language attribute to null

3.5k Views Asked by At

Could someone please help me with this? I am trying to get rid of the ATTRIBUTE "effective_date" or set it to null date by using the below 2 queries and am getting different errors.

=====================================
UPDATE 
    cd_quality (ALL) OBJECTS
TRUNCATE
    effective_date
WHERE
    FOLDER ('C:/temp/path')
AND
    object_name = 'ab'

...

[DM_QUERY_E_UP_SINGLE]error:  "The attribute effective_date is a single-valued attribute."

===============================
UPDATE
    cd_quality(all) objects 
SET
    effective_date = ''
WHERE
    FOLDER ('C:/temp/path')
AND 
    object_name = 'ab'

...
[DM_QUERY_E_UP_CHAR]error:  "UPDATE:  You have attempted to set a non-string attribute (effective_date) with a string value ()."

I also tried the second query with: Set effective_date = null But it still didn’t work. Is there a different null value for dates?

2

There are 2 best solutions below

0
Henning Winter On

DQL ref. guide mentions “NULLDATE”. Maybe this is an option. BTW: Your folder predicate looks odd - I do not believe your repository root folder is named “C:” ;-)

If DQL fails, there is always API scripting. Here the truncate API call will work for sure.

1
vishwen On

SET als_cancellation_date = DATE('NULLDATE')