[Solved] [HSQLDB] SQL statement vs Wrong data type
[Solved] [HSQLDB] SQL statement vs Wrong data type
What is the mistake in SQL ?
Last edited by Hagar Delest on Fri Nov 01, 2019 12:16 pm, edited 1 time in total.
Reason: tagged solved
Reason: tagged solved
| Fedora 31 Workstation Cinnamon of Fedora from Spins | LibreOffice 6.2.8.2-2 | Base with embedded Firebird |
Re: BASIC|HSQLDB| SQL statement vs Wrong data type
Your last image seems to show that EffectiveDate is being passed as the string '10/08/2019' and that is not a valid date format for HSQLDB, if I remember correctly. I think it must have the format 2019-10-08 or maybe 2019-10-08 00:00:00. I see that in your code you try to set the format but the error message suggests that is not working as expected.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Re: BASIC|HSQLDB| SQL statement vs Wrong data type
That works with embedded Firebird of LibreOffice Base.FJCC wrote:Your last image seems to show that EffectiveDate is being passed as the string '10/08/2019' and that is not a valid date format for HSQLDB, if I remember correctly. I think it must have the format 2019-10-08 or maybe 2019-10-08 00:00:00. I see that in your code you try to set the format but the error message suggests that is not working as expected.
Thank you so much for your recommendation.
Finally, I found the way for HSQLDB.
Code: Select all
' https://stackoverflow.com/questions/13141328/how-do-i-create-a-specific-date-in-hsqldb
' HSQLDB converts the string automatically.
Dim fed As String : fed = Year(ed) & "-" & Month(ed) & "-" & Day(ed)
| Fedora 31 Workstation Cinnamon of Fedora from Spins | LibreOffice 6.2.8.2-2 | Base with embedded Firebird |
-
- Posts: 34
- Joined: Sun Mar 01, 2015 3:34 am
Re: [Solved] [HSQLDB] SQL statement vs Wrong data type
This was also posted and answered here -> https://ask.libreoffice.org/en/question ... data-type/
LibreOffice 7.0.2.2
OpenOffice 4.0.1
Ubuntu Mate 20.04.1
Mint 20.3
OpenOffice 4.0.1
Ubuntu Mate 20.04.1
Mint 20.3