Re: [sqlite] Problems Insert with Date and Time values

2007-12-14 Thread Giuliano
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

Re[2]: [sqlite] Problems Insert with Date and Time values

2007-12-14 Thread Ion Silvestru
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: Re[2]: [sqlite] Problems Insert with Date and Time values

2007-12-14 Thread Giuliano
Thank you again for all you work.. Giuliano - Original Message - From: "Ion Silvestru" <[EMAIL PROTECTED]> To: "Giuliano" Sent: Friday, December 14, 2007 10:08 AM Subject: Re[2]: [sqlite] Problems Insert with Date and Time values It seems that "BETWEEN" in

Re[3]: [sqlite] Problems Insert with Date and Time values

2007-12-14 Thread Ion Silvestru
>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

RE: [sqlite] SQLite and Columnar Databases

2007-12-14 Thread Tom Briggs
> This model is completely removed from how the data is physically > stored, eg whether in rows first or in columns first, and the > physical store is determined just by the DBMS behind the scenes, and > hence is an implementation detail. The DBMS can arrange how it likes > in order to

Re: [sqlite] SQLite and Columnar Databases

2007-12-14 Thread Michael Scharf
This is probably do to the cache locality problem. We know how to fix this, Joe. Would you like to have a go at it? What is the fix to the "cache locality problem"? Michael -- http://MichaelScharf.blogspot.com/ -

Re: [sqlite] DeviceSQL

2007-12-14 Thread Clay Dowling
I have to say, this discussion has been very informative, although probably not in a way that would make mr Weick happy. I've certainly learned a lot about encirq that tells me what I need to know about doing business with them. Clay steveweick wrote: > > Good idea... I'll pass it along to the

Re: [sqlite] Should the next release be 3.5.4 or 3.6.0?

2007-12-14 Thread Dennis Cote
Dr Gerard Hammond wrote: (2) If an ORDER BY term is a simple identifer (like "x", not "x.y" and not "x.y.z") and if there if the k-th column uses that same identifer as an AS alias, the sort by the k-th column. CREATE TABLE a(x,y); INSERT INTO a VALUES(1,8); INSERT INTO a

Re: [sqlite] DeviceSQL

2007-12-14 Thread drh
Dennis Cote <[EMAIL PROTECTED]> wrote: > > > I can imagine that a version of Sqlite which does not include its SQL > > compiler and which uses precompiled VDBE code would provide similar > > functionality to DeviceSQL, particularly if the Sqlite compiler were > > extended to generate VDBE from

Re: [sqlite] DeviceSQL

2007-12-14 Thread drh
Nicolas Williams <[EMAIL PROTECTED]> wrote: > On Fri, Dec 14, 2007 at 03:38:17PM +, [EMAIL PROTECTED] wrote: > > That would be the Serialized Statement Extension, SSE. > > The SSE provides the programmer with two new APIs: > > Would it be useful to generate human-readable VDBE "assemply"? >

Re: [sqlite] DeviceSQL

2007-12-14 Thread Dennis Cote
John Stanton wrote: DeviceSQL is not suitable for general purpose SQL processing, unlike Sqlite, and should only be compared as an alternative in deeply embedded applications so the only useful comparison is one which looks like a cell phone, microwave oven or a TV set top box. The

Re: [sqlite] DeviceSQL

2007-12-14 Thread Nicolas Williams
On Fri, Dec 14, 2007 at 03:38:17PM +, [EMAIL PROTECTED] wrote: > That would be the Serialized Statement Extension, SSE. > The SSE provides the programmer with two new APIs: Would it be useful to generate human-readable VDBE "assemply"? Or, how do you develop parser changes that involve new

Re: [sqlite] DeviceSQL

2007-12-14 Thread Nicolas Williams
On Fri, Dec 14, 2007 at 10:10:04AM -0600, Nicolas Williams wrote: > On Fri, Dec 14, 2007 at 03:38:17PM +, [EMAIL PROTECTED] wrote: > > That would be the Serialized Statement Extension, SSE. > > The SSE provides the programmer with two new APIs: > > Would it be useful to generate

Re: [sqlite] DeviceSQL

2007-12-14 Thread drh
Dennis Cote <[EMAIL PROTECTED]> wrote: > > It could be any application that uses a fixed set of predetermined SQL > statements to perform its operations. My primary application does > exactly that using SQLite with all statements prepared and cached as > needed. It runs on a standard PC under

Re: [sqlite] DeviceSQL

2007-12-14 Thread Shawn Wilsher
On Dec 14, 2007 10:38 AM, <[EMAIL PROTECTED]> wrote: > That would be the Serialized Statement Extension, SSE. > The SSE provides the programmer with two new APIs: > >int sqlite3_serialize(sqlite3_stmt*, void**, int*); >int sqlite3_deserialize(sqlite3*, void*, int, sqlite3_stmt**); > > The

RE: [sqlite] DeviceSQL

2007-12-14 Thread Noah Hart
Why can't new OP codes be simply added to the end, so that the serializations will always work? Noah -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, December 14, 2007 8:20 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] DeviceSQL Importance: High

Re: [sqlite] DeviceSQL

2007-12-14 Thread Nicolas Williams
On Fri, Dec 14, 2007 at 04:20:15PM +, [EMAIL PROTECTED] wrote: > The EXPLAIN option generates human-readable assembly. We > use EXPLAIN extensively when debugging and enhancing. Yes, but there's no assembler for EXPLAIN output, is there? Also, the only way to deal with EXPLAIN is to step

Re: [sqlite] Should the next release be 3.5.4 or 3.6.0?

2007-12-14 Thread Zbigniew Baniewski
3.5.4 -- pozdrawiam / regards Zbigniew Baniewski - To unsubscribe, send email to [EMAIL PROTECTED]

Re: [sqlite] DeviceSQL

2007-12-14 Thread drh
"Noah Hart" <[EMAIL PROTECTED]> wrote: > Why can't new OP codes be simply added to the end, so that the > serializations will always work? > We do not often add new opcodes. The usual change is to alter the meaning and operation of existing opcodes. We also delete existing opcodes about as

Re: [sqlite] DeviceSQL

2007-12-14 Thread Steven Fisher
On 14-Dec-2007, at 5:41 AM, Clay Dowling wrote: I have to say, this discussion has been very informative, although probably not in a way that would make mr Weick happy. I've certainly learned a lot about encirq that tells me what I need to know about doing business with them. Same thought

Re: [sqlite] Default Encoding In Sqlite

2007-12-14 Thread Trevor Talbot
I wrote: > The default storage encoding on disk is UTF-8, but it can be changed > to UTF-16 with a PRAGMA. As Igor reminds me, if you create the database file using sqlite3_open16() the default will be UTF-16 instead. You can still set it explicitly via a PRAGMA if you wish.

Re: [sqlite] DeviceSQL

2007-12-14 Thread Dennis Cote
[EMAIL PROTECTED] wrote: Dennis Cote <[EMAIL PROTECTED]> wrote: It could be any application that uses a fixed set of predetermined SQL statements to perform its operations. My primary application does exactly that using SQLite with all statements prepared and cached as needed. It runs on a

Re: [sqlite] Improving performance of SQLite. Anyone heard of DeviceSQL?

2007-12-14 Thread drh
"Lynn Fredricks" <[EMAIL PROTECTED]> wrote: > > I don't know anything about DeviceSQL but their > presentation is enough to get my respect :-) > [...] > > It seems to me that if the engineers are coming to you to defend their > selection of SQLite, then they didnt know SQLite as well as they

Re: [sqlite] create table with datatype = DATE - STORE as DATETIME or INTEGER.

2007-12-14 Thread Joanne Pham
Hi All, Should I create the column in DATETIME or the INTEGER to store the time. DATETIME has the value of GMT time. So I store this value as INTEGER then I need to convert datetime format but it will be use less space if I use the INTEGER. Please give me an advice. Thanks Joanne -

[sqlite] Default Encoding In Sqlite

2007-12-14 Thread Kalyani Phadke
Whats default encoding in SQLite3 ? How does SQLite3 handles storing Japanese/Chinese text in database? I know in SQL express/sql server I have to use nVarchar/nchar/ntext datatypes to store Japanese/Chinese text in database. It seems that in SQLite3 column having text datatype can also store

[sqlite] Re: Default Encoding In Sqlite

2007-12-14 Thread Igor Tandetnik
Kalyani Phadke wrote: Whats default encoding in SQLite3 ? Either UTF-8 or UTF-16, depending on whether the database file was originally created with sqlite3_open or sqlite3_open16. How does SQLite3 handles storing Japanese/Chinese text in database? With aplomb and flair. Igor Tandetnik

Re: [sqlite] Default Encoding In Sqlite

2007-12-14 Thread Trevor Talbot
On 12/14/07, Kalyani Phadke <[EMAIL PROTECTED]> wrote: > Whats default encoding in SQLite3 ? How does SQLite3 handles storing > Japanese/Chinese text in database? I know in SQL express/sql server I > have to use nVarchar/nchar/ntext datatypes to store Japanese/Chinese > text in database. It

Re: [sqlite] create table with datatype = DATE - STORE as DATETIME or INTEGER.

2007-12-14 Thread Dennis Cote
Joanne Pham wrote: Hi All, Should I create the column in DATETIME or the INTEGER to store the time. DATETIME has the value of GMT time. So I store this value as INTEGER then I need to convert datetime format but it will be use less space if I use the INTEGER. Please give me an advice. See

RE: [sqlite] Improving performance of SQLite. Anyone heard of DeviceSQL?

2007-12-14 Thread Lynn Fredricks
> > August? We start to discuss about DeviceSQL some days ago, or I am > > wrong? > > > > I have several support customer in Europe who have been > visited by the Encirq sales rep there, trying to get them to > abandon SQLite in favor of DeviceSQL. The way this normally > happens is that a

Re: [sqlite] DeviceSQL

2007-12-14 Thread John Stanton
Dennis, your application may not be a microwave oven but it does appear to be "deeply embedded" as opposed to a general purpose DB server which handles generic queries. I was aware of the runtime only version of Sqlite, but is it not directly comparable to DeviceSQL unless the external

Re: [sqlite] create table with datatype = DATE - STORE as DATETIME or INTEGER.

2007-12-14 Thread John Stanton
If you make your date and time columns numeric (floating point) you use 8 bytes to store a date and time. You then use the embedded Sqlite date and time functions to present date and time as your application chooses. I believe that if you declare the column as DATE Sqlite will give it an

Re: [sqlite] DeviceSQL

2007-12-14 Thread John Stanton
We did that with our products which used byte code. Byte code compiled on earlier versions would run on later ones, but new code with the extra opcodes would not run on old interpreters. It protected customers who had lost their source code or were afraid to recompile after an upgrade

RE: [sqlite] DeviceSQL

2007-12-14 Thread Samuel R. Neff
-Original Message- From: John Stanton [mailto:[EMAIL PROTECTED] Sent: Friday, December 14, 2007 3:55 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] DeviceSQL ... is it not directly comparable to DeviceSQL unless the external compiler handles not only SQL but also PL/SQL. The

Re: [sqlite] Re: [Linux + PHP] Recommended way to access SQLite?

2007-12-14 Thread Scott Baker
Kees Nuyt wrote: >> So the options are: >> 1. use the old SQLite2 sqlite_() functions (or some class that turns this >> into OO) >> 2. PDO to use the SQLite3 linked-in library >> 3. PDO to access the SQLite3 DLL >> >> ... with 2 being the recommended choice. > > yes, > - 2 for speed and

Re: [sqlite] DeviceSQL

2007-12-14 Thread John Stanton
Samuel R. Neff wrote: -Original Message- From: John Stanton [mailto:[EMAIL PROTECTED] Sent: Friday, December 14, 2007 3:55 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] DeviceSQL ... is it not directly comparable to DeviceSQL unless the external compiler handles not only SQL

Re: [sqlite] Re: [Linux + PHP] Recommended way to access SQLite?

2007-12-14 Thread Kees Nuyt
On Fri, 14 Dec 2007 03:15:17 +0100, Gilles Ganault <[EMAIL PROTECTED]> wrote: >On Mon, 10 Dec 2007 16:35:48 +0100, Kees Nuyt <[EMAIL PROTECTED]> wrote: > >So I activated php_pdo_sqlite_external instead and copied > >sqlite3.dll v3.5.3 to %serverroot%/bin . > >Thanks for the infos. > >So the

Re: [sqlite] DeviceSQL

2007-12-14 Thread Nicolas Williams
On Fri, Dec 14, 2007 at 04:28:07PM -0600, John Stanton wrote: > Samuel R. Neff wrote: > >I'm not sure I see added value in incorporating procedural SQL in an > >embedded database like SQLite or DeviceSQL. Isn't the easily extensible > >mechanism that SQLite has for creating custom functions in

RE: [sqlite] Improving performance of SQLite. Anyone heard of DeviceSQL?

2007-12-14 Thread Lynn Fredricks
> This scenario has played out multiple times. > > Say what you want about DeviceSQL the product, but one thing > is undeniable: their sales presentations are top-notch. The > first remark of yours that I quoted above shows this to be the case. Yes - but a company that sells technical