Ask Your Question
0

Extract(Weekday FROM "date") not working in Libreoffice Base, Firebird embbeded

asked 2019-06-04 19:14:21 +0200

esphi gravatar image

updated 2019-06-04 19:15:06 +0200

Hi, I can't get return in a query with the extrac() function in LibreOffice Base, Firebird Embedded database.

SELECT EXTRACT( WEEKDAY FROM "Date" ) "DayOfWeek", EXTRACT( DAY FROM "Date" ) "Day", EXTRACT( MONTH FROM "Date" ) "Month" FROM "Tbl_Schedule"

This function returned error: EXTRACT( WEEKDAY FROM "Date" )

However, DAY and MONTH returned correct answers.

I am currently using Version: 6.1.6.3 (x64)

Can anyone help? What are the alternatives?

Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2019-06-04 19:33:55 +0200

Ratslinger gravatar image

Hello,

The problem is because of HSQLDB. Yes, your question deals with Firebird embedded.

Queries are parsed (examined) based upon HSQLDB v1.8 embedded databases. This database has no WEEKDAY function and therefore will generate a syntax error. By turning on Run SQL command directly the parsing will be bypassed and the function works.

edit flag offensive delete link more

Comments

Thank you for the answer.

esphi gravatar imageesphi ( 2019-06-10 04:54:48 +0200 )edit

@esphi,

As you have been helped, please help others to know the question has been answered by clicking on the ✔ in upper left area of answer which satisfied the question.

Ratslinger gravatar imageRatslinger ( 2019-06-10 16:08:20 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-06-04 19:14:21 +0200

Seen: 43 times

Last updated: Jun 04