Some functions from marklogic v7 are missing in marklogic 10

Viewed 40

I have installed version 10.0-6.4 and I am running some tests against it. We have baseline tests results again old v 7.0. I am finding out that several functions are missing.

For example date() and datetime(). For example on v7 I can run this query SELECT date(), but on v10 it produces error:

[SQL] XDMP-UNDFUN: (err:XPST0017) Undefined function date().

There are several "missing" functions as compared to v7, so I am wondering if maybe I need to install some additional packages on my v10 or something like that. Anyone help help?

1 Answers

I don't see anything called out in Known Incompatibilities in the release notes mentioning date(), but it is possible that some functions happened to work previously in SQL and are no longer available.

The list of currently supported SQL functions are provided: https://docs.marklogic.com/guide/sql/SQLqueries#id_97459

Instead of date() or dateTime(), you could use curdate()

SELECT curdate();

or curtime()

SELECT curtime();

and you can also use built-in functions, such as fn:current-date()

SELECT fn_current_date();

or fn:current-dateTime()

SELECT fn_current_datetime();
Related