Re: [sqlite] Query problem

2004-01-19 Thread Simon Berthiaume
Maybe I used a too simplistic example. I have code that generates SQL queries so users can request reports with various fields, various criterias and various sorting orders. So technicaly there can be 1,2,3,N inner queries with various statements in them. Here is an example of a more complex query:

Re: [sqlite] Query problem

2004-01-19 Thread Kurt Welgehausen
If you look at the SQLite grammar in lang.html, you'll see that parentheses are not allowed around a table-list. That's why you're getting an error. If you remove either of the first 2 left parens (and its corresponding right paren), the query will work, but the outer select and the first subsele

Re: [sqlite] Query problem

2004-01-19 Thread Simon Berthiaume
Actualy none, there was an error in the statement I copied. But the following works on Access (ADO) and Oracle as well, but not on SQLite. Since I don't have access to any other RDBMS, I couldn't test others. SELECT * FROM ( ( SELECT * from INSCLAIMS ) AS T0 LEFT JOIN

Re: [sqlite] Query problem

2004-01-19 Thread D. Richard Hipp
Simon Berthiaume wrote: SELECT * FROM ( ( SELECT * from INSCLAIMS ) AS T0 LEFT JOIN ( SELECT * FROM INSCLAIMS_CONCAT WHERE ( INSCLAIMS_CONCAT_FIELD_ID = 'INSCLAIMS_POLICYNO' ) ) AS T1 ON T1.INSCLAIMS_ID = T0.

[sqlite] Query problem

2004-01-19 Thread Simon Berthiaume
Yep, it's me again (no I haven't solved my other problem yet). This time I was wondering why the SQL engine of SQLite works fine with the following query: SELECT * FROM ( SELECT * from INSCLAIMS ) AS T0 LEFT JOIN ( SELECT * FROM INSCLAIMS_CONCAT WHERE ( INS

Re: [sqlite] SQLite Browser (Mac OS 10.3)

2004-01-19 Thread David Schmitt
I understand the difference between the two and use them both often, for their intended purposes. Yes, it was Console that I had open each time I was launching SQLite Browser and attempting to monitor for errors... and each time Console showed nothing. I have tried this on multiple computers r

[sqlite] Bug or "feature" in sqlite_exec?

2004-01-19 Thread Simon Berthiaume
I'm having a problem with function sqlite_exec. I call sqlite_exec with the followinf SQL query with the SHOW_DATATYPE pragma set ON: SELECT T0.OBJECTS_ID, T0.OBJECTS_COLTYPE, T0.OBJECTS_OBJTYPE, T0.OBJECTS_ORIGIN, T0.OBJECTS_DATE, T1.OBJECTS_CONCAT_VALUE FROM OBJECTS AS T0 LEFT JOIN (

[sqlite] Python schema generating module

2004-01-19 Thread David M. Cook
I've written a little Python module to generate sqlite schemas. Why? My initial reason was that I wanted to have some metadata for my application, and the easiest way to do that was to encapsulate the data into some objects and then use those to generate the needed SQL (this was after I gave up tr