Re: [sqlite] BUG: the rowid column in view is automatically named as id

2009-12-14 Thread Jens Miltner
Am 09.12.2009 um 13:42 schrieb Alexey Pechnikov: Hello! On Wednesday 09 December 2009 15:07:16 Pavel Ivanov wrote: It's been said in this list not once already: unless you're using as ... to name the column it's not guaranteed to have any particular name you expect it to. So it's not a

Re: [sqlite] BUG: The sqlite3 shell does not call setlocale

2009-12-14 Thread Jean-Denis Muys
On 12/13/09 16:34 , Jay A. Kreibich j...@kreibi.ch wrote: On Sun, Dec 13, 2009 at 01:47:43PM +0300, Alexey Pechnikov scratched on the wall: On Sunday 13 December 2009 02:09:48 Roger Binns wrote: The libsqlite is locale-independent but sqlite3 shell linked with readline and it's

Re: [sqlite] SQLite version 3.6.21

2009-12-14 Thread P Kishor
On Sun, Dec 13, 2009 at 10:53 PM, Roger Binns rog...@rogerbinns.com wrote: And just to blow your mind, SQLite supports zero length names too!  create table (); true, true SQLite version 3.6.19 Enter .help for instructions Enter SQL statements terminated with a ; sqlite CREATE TABLE ( UNIQUE

Re: [sqlite] BUG: The sqlite3 shell does not call setlocale

2009-12-14 Thread Jay A. Kreibich
On Mon, Dec 14, 2009 at 10:41:04AM +0100, Jean-Denis Muys scratched on the wall: On 12/13/09 16:34 , Jay A. Kreibich j...@kreibi.ch wrote: On Sun, Dec 13, 2009 at 01:47:43PM +0300, Alexey Pechnikov scratched on the wall: On Sunday 13 December 2009 02:09:48 Roger Binns wrote: The

Re: [sqlite] BUG: The sqlite3 shell does not call setlocale

2009-12-14 Thread Nicolas Williams
On Sat, Dec 12, 2009 at 12:39:23PM -0800, Roger Binns wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Alexey Pechnikov wrote: On unix the shell must do this initialisation: setlocale(LC_ALL, ); Why? Yes I know what the call does, but what desirable effect does it have on

Re: [sqlite] BUG: The sqlite3 shell does not call setlocale

2009-12-14 Thread Jean-Denis Muys
On 12/14/09 16:56 , Jay A. Kreibich j...@kreibi.ch wrote: On Mon, Dec 14, 2009 at 10:41:04AM +0100, Jean-Denis Muys scratched on the wall: So Jay, what you are saying is that SQLite doesn't have to provide bug-free features when those features are optional? [snip] So, yes, I'm saying,

Re: [sqlite] sqlite files and locking on Lustre filesystems.

2009-12-14 Thread Nicolas Williams
On Sun, Dec 13, 2009 at 11:02:18AM -0800, George Hartzell wrote: My computing environment at work is bringing a new cluster online, in addition to some local storage there will be shared access to SAN style storage using the Lustre filesystem. My reading about Lustre tells me that it

[sqlite] how to build complex sql queries without sprintf()

2009-12-14 Thread Denis Gorodetskiy
The right way to query sqlite is to use sqlite3_prepare() and sqlite3_bind_xxx() and then sqlite3_step(). How do you build complex queries of form SELECT * FROM parent WHERE id IN (SELECT parent_id FROM child_table1 WHERE child_param1=x AND child_param2=y INTERSECT SELECT parent_id FROM

Re: [sqlite] sqlite-users Digest, Vol 24, Issue 12

2009-12-14 Thread Florian Schricker
Hi everyone, first off thanks to everyone for replying to my answer! On Sat, Dec 12, 2009 at 1:00 PM, sqlite-users-requ...@sqlite.org wrote:   7. Re: SQL question (Pavel Ivanov)   8. Re: SQL question (Rich Shepard)  10. Re: SQL question (Igor Tandetnik)  11. Re: SQL question (Simon Slavin)

[sqlite] ASCII encoding

2009-12-14 Thread Didier Cabalé
Hi, I would like to limit the data stored in my SQLite database only to ASCII characters. For example, if a user tries to enter 'cabalé' (note the 'e' with an accent), then it will be stored as 'cabale' (without the accent) in the database. I know there is no character encoding in SQLite, except

Re: [sqlite] sqlite-users Digest, Vol 24, Issue 12

2009-12-14 Thread Simon Slavin
On 14 Dec 2009, at 8:52am, Florian Schricker wrote: Primary keys are Oper, Product, Category, Name and CreateTS There is only one primary key per table. So to say the primary key is Oper, Product, Category, Name, CreateTS. No. Go read a boos on databases. The shorter your primary key

Re: [sqlite] ASCII encoding

2009-12-14 Thread Igor Tandetnik
Didier Cabalé didier.cab...@gmail.com wrote: I would like to limit the data stored in my SQLite database only to ASCII characters. For example, if a user tries to enter 'cabalé' (note the 'e' with an accent), then it will be stored as 'cabale' (without the accent) in the database. How would

Re: [sqlite] sqlite-users Digest, Vol 24, Issue 12

2009-12-14 Thread Igor Tandetnik
Florian Schricker fschric...@gmail.com wrote: select OPER, PRODUCT, CATEGORY, NAME, [...], VALUE, TEXT, max(CREATETS) as CREATETS from table where oper = 'myOper' and product = 'myProduct' and Category = 'myCategory' group by OPER, PRODUCT, CATEGOY, NAME order by CREATETS desc which is

Re: [sqlite] rowid of the current insert

2009-12-14 Thread Yuzem
Tim Romano wrote: You should keep your id and the imdbid in separate columns, because you can then insert a title even if IMDB does not have it yet. Ok, I have thought about this and it will be probably simpler to have two separated ids than using a trigger. Now, there are some problems:

Re: [sqlite] how to build complex sql queries without sprintf()

2009-12-14 Thread Igor Tandetnik
Denis Gorodetskiy nou...@gmail.com wrote: The right way to query sqlite is to use sqlite3_prepare() and sqlite3_bind_xxx() and then sqlite3_step(). How do you build complex queries of form SELECT * FROM parent WHERE id IN (SELECT parent_id FROM child_table1 WHERE child_param1=x AND

Re: [sqlite] rowid of the current insert

2009-12-14 Thread Tim Romano
You basically have this structure: MOVIES movieid, title PEOPLE peopleid, name MOVIEPEOPLE movieid, peopleid, role You insert a row into MOVIES and then insert one or more rows into PEOPLE and then you want to associate people with a movie in your MOVIESPEOPLE table. In order to do this,

[sqlite] sqlite ICU libs with otool

2009-12-14 Thread Sylvain Pointeau
Hi, I compiled sqlite 3.6.21 (ICU enabled) + icu 4.2.1 I installed both in /usr/local/lib I also compiled the sqlite plugin of Qt linked with libsqlite3 located in /usr/local/lib the problem is when I want a single bundle with no external dependency. when I use macdeployqt, I have the following

Re: [sqlite] sqlite ICU libs with otool

2009-12-14 Thread Sylvain Pointeau
I had to do: sudo install_name_tool -change libicuuc.42.dylib /usr/local/lib/libicuuc.42.dylib libicui18n.42.1.dylib sudo install_name_tool -change libicudata.42.dylib /usr/local/lib/libicudata.42.dylib libicui18n.42.1.dylib sudo install_name_tool -change libicudata.42.dylib

Re: [sqlite] Using Parameters with views

2009-12-14 Thread Tim Romano
I know the original question was about views and parameters, but if the OP just needs the answer to this kind of query and a view isn't mandatory, I've been able to use a parameter with the HAVING clause. The query could be rewritten: select artistname from artist join ITEM_ARTIST on

Re: [sqlite] Sqlite and php

2009-12-14 Thread FrankLane
Hi - I ran across a php script where the data file was created in /tmp, so I tried that, and it works! I found some errors in my insert command, basically they were differences in insert as opposed to reading a tab-delimited file as I was doing in sqlite3. For example, two commas are interpreted

Re: [sqlite] Sqlite and php

2009-12-14 Thread Simon Slavin
On 15 Dec 2009, at 3:00am, FrankLane wrote: Hi - I ran across a php script where the data file was created in /tmp, so I tried that, and it works! Just be aware that it may be deleted when that computer is rebooted. That's what /tmp is for. I found some errors in my insert command,

Re: [sqlite] Import feature requests

2009-12-14 Thread Walter Dnes
On Sun, Dec 13, 2009 at 10:31:20PM -0800, Roger Binns wrote Hint: If you feel the need to get aggressive and abusive when posting then you probably missed something! If SQLite was useless, someone else would have noticed by now. I apologize for coming across that way; I din't intend to.