Re: Re[2]: [sqlite] Problems Insert with Date and Time values
Thank you again for all you work.. Giuliano - Original Message - From: "Ion Silvestru" <[EMAIL PROTECTED]> To: "Giuliano" <sqlite-users@sqlite.org> Sent: Friday, December 14, 2007 10:08 AM Subject: Re[2]: [sqlite] Problems Insert with Date and Time values It seems that "BETWEEN" in SQLite is treated as "BETWEEN..AND selects fields that are between and including the test values", so it can be used instead of ">=" and "<=". - To unsubscribe, send email to [EMAIL PROTECTED] -
Re[3]: [sqlite] Problems Insert with Date and Time values
>It seems that "BETWEEN" in SQLite is treated as "BETWEEN..AND selects >fields that are between and including the test values", so it can be >used instead of ">=" and "<=". I am sorry, but it seems I am partially correct. I tested again and concluded: 1. "BETWEEN" in SQLite is treated as "BETWEEN..AND selects fields that are between and including the test values", so it can be used instead of ">=" and "<=", ONLY if you specify COMPLETE test values, example "20071001" AND "20071131". 2. If you specify PARTIAL test values, example "200710" AND "200711", then "BETWEEN" in SQLite is treated as "BETWEEN..AND selects fields between the test values, including the first test value and excluding the last test value". 3. It is not reliable to use "BETWEEN" for now (and not only in SQLite, but also in other DBMS), better use >= and <=. - To unsubscribe, send email to [EMAIL PROTECTED] -
Re[2]: [sqlite] Problems Insert with Date and Time values
It seems that "BETWEEN" in SQLite is treated as "BETWEEN..AND selects fields that are between and including the test values", so it can be used instead of ">=" and "<=". - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Problems Insert with Date and Time values
Thanks a lot! any suggestion for a query then that read and compare dates, for ex.: SELECT somefiled FROM sometable WHERE datefield1 BETWEEN ' '? AND ' '? How can I query then the string values as date? Thanks again Giuliano - Original Message - From: "Ion Silvestru" <[EMAIL PROTECTED]> To: "Giuliano" <sqlite-users@sqlite.org> Sent: Friday, December 14, 2007 8:55 AM Subject: Re: [sqlite] Problems Insert with Date and Time values >is it possible (how?) to insert into 2 different fields (date) the >following values: 09:30:00(only a time value...) 14/07/07 (only year value, 14th of december 2007) Just store date and/or time as string: "20070714" or "070714", "093000". It is compact, you can sort them easily etc. You can store them also as Integer: 20070714, 93000, this will save space in database, as integers are stored in variable-length format (VarInt). - To unsubscribe, send email to [EMAIL PROTECTED] - - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] Problems Insert with Date and Time values
Hello, is it possible (how?) to insert into 2 different fields (date) the following values: 09:30:00(only a time value...) 14/07/07 (only year value, 14th of december 2007) sorry, I am not be able at all to do that. Many thanks in advance for helping, Giuliano - To unsubscribe, send email to [EMAIL PROTECTED] -