[sqlite] Compound Ops: syntax error?

2006-03-01 Thread Boris Popov
Not sure if its me, but I just can't figure out why these queries don't work. As far as I can tell looking at the docs all these compound ops are supported: UNION | UNION ALL | INTERSECT | EXCEPT Any ideas? SQL OK: SELECT t1.ID, t1.STREET, t1.HOUSE_NUM FROM GR_ADDRESS t1 SQL NOT OKAY 1: near

[sqlite] ORDER BY of UNION?

2006-03-01 Thread Boris Popov
I can't seem to get unions to sort properly, SELECT DISTINCT * FROM (SELECT t1.ID FROM GR_ADDRESS t1 UNION ALL SELECT t1.ID FROM PERSON t1) t1 ORDER BY t1.ID DESC results in "no such column: t1.ID" error. How would I go about sorting the result set in this case? Cheers! -Boris --

RE: [sqlite] Compound Ops: syntax error?

2006-03-01 Thread Boris Popov
, please notify the sender and delete the entire message including any attachments. Thank you. -Original Message- From: Boris Popov [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 01, 2006 7:48 PM To: sqlite-users@sqlite.org Subject: [sqlite] Compound Ops: syntax error? Not sure if its

RE: [sqlite] ORDER BY of UNION?

2006-03-01 Thread Boris Popov
10:19 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] ORDER BY of UNION? At 8:59 PM -0800 3/1/06, Boris Popov wrote: >I can't seem to get unions to sort properly, > >SELECT DISTINCT * FROM (SELECT t1.ID >FROM GR_ADDRESS t1 UNION ALL SELECT t1.ID >FROM PERSON t1) t1 ORDE

RE: [sqlite] ORDER BY of UNION?

2006-03-02 Thread Boris Popov
mation that is private and confidential. If you have received it in error, please notify the sender and delete the entire message including any attachments. Thank you. -Original Message- From: Boris Popov [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 01, 2006 11:59 PM To: sqlite

RE: [sqlite] ORDER BY of UNION?

2006-03-02 Thread Boris Popov
- From: Dennis Cote [mailto:[EMAIL PROTECTED] Sent: Thursday, March 02, 2006 1:52 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] ORDER BY of UNION? Boris Popov wrote: >Looks like I'm on my own with this one :) > >After a bit of fiddling with it this morning, I figured I had to do this

[sqlite] varchar(20) column reported as SQLITE_NULL?

2006-03-17 Thread Boris Popov
While executing 'SELECT REGION FROM EMPLOYEE' I came across a column that is SQLITE_NULL as far as sqlite3_column_type is concerned, but really is varchar(20) if you ask for sqlite3_column_decltype? Is varchar(20) illegal in SQLite? Certainly looks like "typename ( number )" is okay at

[sqlite] "bind or column index out of range" when using :AAA notation?

2006-03-18 Thread Boris Popov
In the following prepared statement, SELECT * FROM STUFF WHERE ID = :2 OR ID = :17 Trying to determine index of ":17" via sqlite3_bind_parameter_index results in 'bind or column index out of range' exception. Am I misreading the docs again? ;) Quote: "... one or more literals can be replace by

RE: [sqlite] "bind or column index out of range" when using :AAA notation?

2006-03-18 Thread Boris Popov
. Unless otherwise indicated, it contains information that is private and confidential. If you have received it in error, please notify the sender and delete the entire message including any attachments. Thank you. -Original Message- From: Boris Popov [mailto:[EMAIL PROTECTED] Sent

[sqlite] Error when matching column names in a view

2006-03-24 Thread Boris Popov
Any comments would be appreciated, SQLite version 3.3.4 Enter ".help" for instructions sqlite> create table one (id integer primary key); sqlite> create table two (id integer primary key); sqlite> select one.id, two.id from one join two where one.id=two.id; sqlite> create view three as select

Re: [sqlite] LIKE and GLOB bug with numbers?

2006-03-26 Thread Boris Popov
John Stanton wrote: Tito Ciuro wrote: On 26/03/2006, at 10:51, MGC wrote: Your design is fundamentaly wrong. I don't know what your intended use is for this data, but I am logging identical fstat file info along with an MD5 sums. Well... if you don't know what is the intended use for

Re: [sqlite] How to get the schema

2006-03-26 Thread Boris Popov
Brett Goodman wrote: Is there another way to get the column schema besides parsing the original CREATE TABLE command? Sure, sqlite3_table_column_metadata, see http://sqlite.org/capi3ref.html#sqlite3_table_column_metadata This routine is used to obtain meta information about a specific

RE: [sqlite] Inserting image files into a database table

2006-03-27 Thread Boris Popov
You should bind the blob to the prepared insert statement, insert into first_table (picture_name, picture) values (?,?) Then sqlite3_bind_text() your name and sqlite3_bind_blob() your image bytes to the sqlite3_stmt that's the result of sqlite3_prepare().

RE: [sqlite] select foo,count(foo) -> segmentation fault

2006-03-28 Thread Boris Popov
Don't go too far, check out http://www.sqlite.org/lang.html :) -Boris -- +1.604.689.0322 DeepCove Labs Ltd. 4th floor 595 Howe Street Vancouver, Canada V6C 2T5 [EMAIL PROTECTED] CONFIDENTIALITY NOTICE This email is intended only for the persons named in the message header. Unless otherwise

RE: [sqlite] Error when matching column names in a view

2006-03-28 Thread Boris Popov
attachments. Thank you. -Original Message- From: Boris Popov [mailto:[EMAIL PROTECTED] Sent: Friday, March 24, 2006 4:16 PM To: sqlite-users@sqlite.org Subject: [sqlite] Error when matching column names in a view Any comments would be appreciated, SQLite version 3.3.4 Enter "

[sqlite] sqlite3_step crash?

2006-03-28 Thread Boris Popov
Hmm, I have a fairly specific scenario here where after fetching values from all the rows in the result set calling sqlite3_step segfaults instead of returning SQLITE_DONE. I'm at a loss as to how I could extract a little more info to help figure this out, so any pointers would be greatly

RE: [sqlite] sqlite3_step crash?

2006-03-28 Thread Boris Popov
information that is private and confidential. If you have received it in error, please notify the sender and delete the entire message including any attachments. Thank you. -Original Message- From: Boris Popov [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 28, 2006 10:16 PM To: sqlite-users

RE: [sqlite] sqlite3_step crash?

2006-03-28 Thread Boris Popov
you have received it in error, please notify the sender and delete the entire message including any attachments. Thank you. -Original Message- From: Boris Popov [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 28, 2006 10:32 PM To: sqlite-users@sqlite.org Subject: RE: [sqlite] sqlite3_step cr

RE: [sqlite] sqlite3_step crash?

2006-03-29 Thread Boris Popov
h 29, 2006 6:40 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] sqlite3_step crash? On Wed, 29 Mar 2006 [EMAIL PROTECTED] wrote: >"Boris Popov" <[EMAIL PROTECTED]> wrote: >> >> Does this help at all? >> > >No. A stack trace, especially one witho

RE: [sqlite] How to unsubscribe from this maillist ?

2006-04-03 Thread Boris Popov
Richard, See the following link for a comment from one of the developers, http://tinyurl.com/pobqu Cheers! -Boris -- +1.604.689.0322 DeepCove Labs Ltd. 4th floor 595 Howe Street Vancouver, Canada V6C 2T5 [EMAIL PROTECTED] CONFIDENTIALITY NOTICE This email is intended only for the

RE: [sqlite] How to unsubscribe from this maillist ?

2006-04-03 Thread Boris Popov
To remove your address from the list, just send a message to, <[EMAIL PROTECTED]> Cheers! -Boris -- +1.604.689.0322 DeepCove Labs Ltd. 4th floor 595 Howe Street Vancouver, Canada V6C 2T5 [EMAIL PROTECTED] CONFIDENTIALITY NOTICE This email is intended only for the persons named in the

RE: [sqlite] Programmatical determination of sqlite version via SQL?

2006-04-03 Thread Boris Popov
I'm sorry? That's exactly what Alex was asking for, he needs to know the version of SQLite DLL that Mono picked up. Via query, 'select sqlite_version()' -> '3.3.4' Via function, sqlite3_libversion() -> '3.3.4' Cheers! -Boris -- +1.604.689.0322 DeepCove Labs Ltd. 4th floor 595 Howe Street

RE: [sqlite] last modified time or version of sqlite database

2006-04-03 Thread Boris Popov
Umm, how about a "last modified at" file attribute on your db file? -Boris -- +1.604.689.0322 DeepCove Labs Ltd. 4th floor 595 Howe Street Vancouver, Canada V6C 2T5 [EMAIL PROTECTED] CONFIDENTIALITY NOTICE This email is intended only for the persons named in the message header. Unless

RE: [sqlite] Trouble with Memory DBs

2006-04-06 Thread Boris Popov
Try, :memory: Cheers! -Boris -- +1.604.689.0322 DeepCove Labs Ltd. 4th floor 595 Howe Street Vancouver, Canada V6C 2T5 [EMAIL PROTECTED] CONFIDENTIALITY NOTICE This email is intended only for the persons named in the message header. Unless otherwise indicated, it contains information that