What is the SQL/MP equivalent of CURRENT_DATE?

983 views Asked by At

SQL/MP is an SQL dialect used on proprietary HP NonStop SQL database systems which go back to the 1980ies... (Who has ever worked on a system that is as old as they are, huh? :))

SQL/MP is only somewhat ANSI compliant, for example CURRENT_DATE does not exist. I have however a hard time figuring out what functions do exist that can help me to get the current date in my queries.

Can anyone help me with this dinosaur of an SQL language?

2

There are 2 answers

1
Andy Simpson On BEST ANSWER

Try CURRENT or CURRENT_TIMESTAMP depending on the context.

The HP NonStop SQL/MP Reference Manual is excellent for this sort of thing - one advantage of using an older product, the documentation is good.

This is the url of HP NonStopSQL/MP Reference Manual you can download it´s a pdf file.

0
oscaraleman.dev On

You can use this:

CURRENT YEAR TO DAY

CURRENT is a function that returns the current local date, time, or both. You can find the options of parameters in the HPE NonStopSQL/MP Reference Manual it´s most recent documentation that I know.