Re: [sqlite] Java Database Access Code Generator

2009-01-08 Thread Thomas DILIGENT
Hello, In one hand, object persistence framework provide solutions starting from a description of your DB - object mapping. Unfortunately, these solutions are not easy to deploy. Does not seem to fit your need. In the other hand, if you just want java database access, you can have a look at

Re: [sqlite] 600ms for simple query: How to optimize it?

2009-01-08 Thread MikeW
Lukas Haase writes: > > Hello, > > Can somebody tell me why this (simple) query take so much time? This > query does nothing more than querying a table and JOINing two other > tables together. > ... snip ... > > Does anybody have an idea what's going wrong here? How can I

[sqlite] week number

2009-01-08 Thread PooLpi
Hello, Happy new year 2009 to the list ;) I'm working on weeks with Perl (DateTime module) and Sqlite. With the end of 2008 and the beginning of 2009 : In my database, if i select dates at the end of 2008, it gives me : week #51 => 22-28 dec week #52 => 29-31 dec at the beginning of

Re: [sqlite] selecting the top 3 in a group

2009-01-08 Thread Edzard Pasma
--- robert.ci...@gmail.com wrote: > I am still curious to know if there is a purely SQL way to do the same. This can be achieved using group_concat: select div, rtrim (substr (s, 1, 10)) nr1, rtrim (substr (s, 1, 10)) nr2, rtrim (substr (s, 1, 10)) nr3 from ( select div,

Re: [sqlite] week number

2009-01-08 Thread MikeW
PooLpi writes: > > Hello, > > Happy new year 2009 to the list ;) > > I'm working on weeks with Perl (DateTime module) and Sqlite. > ...snip... > The ISO (ISO8601) definition says that the first week containing a Thursday > is week #1. > > My dates in the database are in this

Re: [sqlite] selecting the top 3 in a group

2009-01-08 Thread Igor Tandetnik
"Robert Citek" wrote in message news:4145b6790901072206u73b367f1g3d377bb6962de...@mail.gmail.com > How can I construction a SQL query to pick the top three (3) items in > a group? > > I have a list of sports teams which are grouped into divisions, say A, > B, C, D, etc.

Re: [sqlite] week number

2009-01-08 Thread PooLpi
Thanks MikeW, Is there a way to do strftime %W with another function. It don't seems to be possible with datetime. Thanks PooLpi 2009/1/8 MikeW > PooLpi writes: > > > > > Hello, > > > > Happy new year 2009 to the list ;) > > > > I'm working on weeks with

[sqlite] Finding similar strings

2009-01-08 Thread htizo
G'day, Using sqlitev2.8.17 in php5 is there a way to look up a table for similar strings (case insensitive)? i.e. If I have the string "BLADEcatcher" I want to find "blade_catcher" or "bladecatcher1" or even "bladecatcha" so say 60% - 70% of characters the same. I hope I've explained that

Re: [sqlite] Finding similar strings

2009-01-08 Thread Michael Schlenker
htizo schrieb: > G'day, > Using sqlitev2.8.17 in php5 is there a way to look up a table for similar > strings (case insensitive)? > i.e. If I have the string "BLADEcatcher" > I want to find "blade_catcher" or "bladecatcher1" or even "bladecatcha" > so say 60% - 70% of characters the same. sqlite

Re: [sqlite] selecting the top 3 in a group

2009-01-08 Thread Robert Citek
Thanks, Igor. That worked perfectly. Time for me to read up on rowid and the subtleties of subselects. Regards, - Robert On Thu, Jan 8, 2009 at 6:48 AM, Igor Tandetnik wrote: > select div, team from teams t1 where rowid in > (select rowid from teams t2 where t1.div =

[sqlite] Copy database from memory to disk - sometimes works, sometimes not

2009-01-08 Thread Zbigniew Baniewski
Reading the paper http://www.tcl.tk/community/tcl2004/Papers/D.RichardHipp/drh.html I'm trying to use the ability to work using "in-memory-database". But there is a problem: sometimes the data doesn't get transferred from memory back onto disk. The procedure, that I wrote, is fairly simple: #v+

Re: [sqlite] Copy database from memory... [resolved]

2009-01-08 Thread Zbigniew Baniewski
Sorry for noise: the problem was in quite other place. -- pozdrawiam / regards Zbigniew Baniewski ___ sqlite-users mailing list sqlite-users@sqlite.org

[sqlite] update PHP

2009-01-08 Thread Emil Obermayr
Hello list, I run a Windows XP system and want to "fill" the sqlite-DB through a ODBC-connection with data from other databases and then use it on a independant server (lighttp on USB-stick). The sqlite-version I get as ODBC-driver works nicely. The sqlite-version I get included in PHP as well.

[sqlite] insert or replace

2009-01-08 Thread liron.levy10
i am trying to use the "insert or replace" query command , and "insert" is the command who executed always even though the query is alredy exist. and the right command to use is "replace" command someone know what is the problem? -- View this message in context:

Re: [sqlite] insert or replace

2009-01-08 Thread S B
Do you have a primary key on the table you're running the insert or replace statement on? I'm assuming you meant the record already exists. SB On Thu, Jan 8, 2009 at 9:30 AM, liron.levy10 wrote: > > i am trying to use the "insert or replace" query command , and

[sqlite] How to create a Datatable [first steps of newbie]

2009-01-08 Thread Alessio Forconi
Hello everyone, I am making the first steps with the programming and I want to help create a DataTable from a database sqlite with C #. Can you give me an example of how do I create it without using a dataset? Thank you very much for your help. ___

Re: [sqlite] How to create a Datatable [first steps of newbie]

2009-01-08 Thread Roosevelt Anderson
If you trying to extract data from a sqlite database to a DataTable here is how you do it using the .Net data provider: SQLiteConnection conn = new SQLiteConnection("Data Source=database.db"); conn.Open(); SQLiteDataAdapter apt = new SQLiteDataAdapter("select *

Re: [sqlite] Fwd: memory usage

2009-01-08 Thread ed
I haven't looked much at the source but will give it a shot.Thanks for the reply. On Wed, Jan 7, 2009 at 12:31 PM, Kees Nuyt wrote: > On Wed, 7 Jan 2009 10:25:12 -0800, ed > wrote in General Discussion of SQLite Database > : > >

Re: [sqlite] insert or replace

2009-01-08 Thread Jay A. Kreibich
On Thu, Jan 08, 2009 at 06:30:38AM -0800, liron.levy10 scratched on the wall: > > i am trying to use the "insert or replace" query command , and "insert" is > the command who executed always even though the query is alredy exist. and > the right command to use is "replace" command > someone know

Re: [sqlite] How to get the total row number of a table by Sqlite more efficient?

2009-01-08 Thread jesuscheung
if your table's primary key is auto incremented, try: select max(id) from table this will be faster than using count() -- View this message in context: http://www.nabble.com/How-to-get-the-total-row-number-of-a-table-by-Sqlite-more-efficient%EF%BC%9F-tp20061797p21359430.html Sent from the

Re: [sqlite] update PHP

2009-01-08 Thread Kees Nuyt
On Thu, 8 Jan 2009 15:29:33 +0100, n...@nobswolf.info (Emil Obermayr) wrote in General Discussion of SQLite Database : >Hello list, > >I run a Windows XP system and want to "fill" the sqlite-DB through a >ODBC-connection with data from other databases and then use it on a

Re: [sqlite] Java Database Access Code Generator

2009-01-08 Thread Mark Fraser
Actually, Firestorm DAO pretty much does what I want. The problem with that solution is that it would leave me with the dilemma of limiting myself to 20 tables or paying for a $1000 license. I have sqlite-jdbc. It works fine. But using raw jdbc is pretty painful. I am surprised there are

Re: How to get the total row number of a table by Sqlite more efficient��Y

2009-01-08 Thread Igor Tandetnik
jesuscheung wrote: > if your table's primary key is auto incremented, try: > > select max(id) from table > > this will be faster than using count() ... but would give incorrect answer if records are ever deleted from the table. Igor Tandetnik

[sqlite] Retrieving NANs

2009-01-08 Thread Sander Jansen
I need to store NaNs in my database and able to retrieve them as well. Since sqlite will give me back 0.0 when I call sqlite3_column_double and a result contains a NAN, I was wondering what the best way is to retrieve a NAN from the database. Here's what I currently do in peudo code: if

Re: [sqlite] How to create a Datatable [first steps of newbie]

2009-01-08 Thread htizo
Alessio Forconi wrote: > > Hello everyone, > > I am making the first steps with the programming and I want to help > create a DataTable from a database sqlite with C #. > Can you give me an example of how do I create it without using a > dataset? > Thank you very much for your help. > Just

Re: [sqlite] Finding similar strings

2009-01-08 Thread htizo
Michael Schlenker-4 wrote: > > htizo schrieb: >> G'day, >> Using sqlitev2.8.17 in php5 is there a way to look up a table for similar >> strings (case insensitive)? >> i.e. If I have the string "BLADEcatcher" >> I want to find "blade_catcher" or "bladecatcher1" or even "bladecatcha" >> so say

Re: [sqlite] Retrieving NANs

2009-01-08 Thread Gerry Snyder
Sander Jansen wrote: > I need to store NaNs in my database and able to retrieve them as well. > > Since sqlite will give me back 0.0 when I call sqlite3_column_double > and a result contains a NAN, > I was wondering what the best way is to retrieve a NAN from the database. > > Here's what I

[sqlite] Problem with sqlite in mac

2009-01-08 Thread anees ahamed
Hi, I have a problem using sqlite in mac. When I run my application(executable jar) from Windows OS, it works perfectly. But when I try to launch the application from Mac, I get the following error apples-imac:CreateJar apple$ java -jar TreeTable.jar Unable to load sqlite: java.lang.