Le 19/03/2015 23:15, xavier2 a écrit :
Hello
I need to insert the current date from my computer into a field from a
database.
SQL has a function called NOW() which introduce the current date into a
field. However, I don't know very well how this work. I tried to visit a
website giving code examples in SQL... w3schools.com however I find
differences between the SQL language posted in that website and the SQL
language used in LibreOffice Base
For example, at w3schools.com they would suggest me this code to introduce
the current system date and hour into a field of my database (sorry for the
fields are in Spanish)...
SELECT
ID_Empleados,
Nombre,
Apellido1ero,
Direccion,
NOW( )
PerDate
FROM
tbl_EMPLEADOS
If that is what w3cschools are suggesting as an insert, then they need
to revise the lessons ;-)
The above is a select statement, not an insert statement
Okay, that code will fail in LibreOffice Base, and it is SQL ...
A query like the following works fine with the default hsqldb engine
(embedded hsqldb) ODB :
select ID, 'TauxFacturation', NOW() from "Employés"
So I was wondering if the SQL from LibreOffice Base change very much from
the original SQL and if we have more notation changes...
LibreOffice uses hsqldb 1.8 as the default embedded db engine
Other db engines use their own forms of SQL syntax.
Alex
--
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.