Re: [sqlite] free excel-like COLORFUL gui for sqlite

2008-01-08 Thread Mag. Wilhelm Braun
there are a number of front ends to sqlite - I use sometime tksqlite. http://reddog.s35.xrea.com/wiki/TkSQLite.html maybe not exactly what you want - but it might be a starting point. regards W.Braun [EMAIL PROTECTED] wrote: Still not sure why you want to use SQLite here, but I think to get

Re: [sqlite] Best way of merging tables

2007-12-31 Thread Mag. Wilhelm Braun
Thanks a lot Kees Nuyt, greate help W.Braun Kees Nuyt wrote: On Mon, 31 Dec 2007 09:56:23 +0100, "Mag. Wilhelm Braun" <[EMAIL PROTECTED]> wrote: hi, I have following situation: database2006: table 'myname': Columns: "ID integer primary key, timestamp in

[sqlite] Best way of merging tables

2007-12-31 Thread Mag. Wilhelm Braun
hi, I have following situation: database2006: table 'myname': Columns: "ID integer primary key, timestamp integer, x text, y text database2007: table 'myname': Columns: "ID integer primary key, timestamp integer, x text, y text empty comvineddatabase: : table 'myname': Columns: "ID integer

Re: [sqlite] Re: Fastest way to check if new row or update existing one?

2007-12-25 Thread Mag. Wilhelm Braun
Thanks Pagaltzis. Great help. W.Braun A. Pagaltzis wrote: * Mag. Wilhelm Braun <[EMAIL PROTECTED]> [2007-12-25 19:30]: If row 50 does not exists it does nothing and I seem not to get any return to know? http://sqlite.org/c3ref/changes.html using pysqlite. I don’

Re: [sqlite] Re: Fastest way to check if new row or update existing one?

2007-12-25 Thread Mag. Wilhelm Braun
return to know? using pysqlite. Thanks W.Braun A. Pagaltzis wrote: * Mag. Wilhelm Braun <[EMAIL PROTECTED]> [2007-12-25 15:10]: QUESTION: is there a better way to make this important decision? using Sqlite 1. If you are changing the entire row on every update, you can simp

[sqlite] Fastest way to check if new row or update existing one?

2007-12-25 Thread Mag. Wilhelm Braun
hi, just a short question to speed up: as with any database one has quite often to decide if we *INSERT a NEW row -- or -- UPDATE an existing row* at the moment I do a check select on an unique ID intege which is resonable fast: code:

Re: [sqlite] Re: Re: Any Ideas to speed up CAST

2007-12-22 Thread Mag. Wilhelm Braun
Thanks excellent thought - so simple and I did not think about it. What a shame. THANKS once again and 'MERRY X-MASS' W.Braun Igor Tandetnik wrote: Mag. Wilhelm Braun <[EMAIL PROTECTED]> wrote: I would be interesting about your point of keeping the precision in floating point

Re: [sqlite] Re: Any Ideas to speed up CAST

2007-12-22 Thread Mag. Wilhelm Braun
: Mag. Wilhelm Braun <[EMAIL PROTECTED]> wrote: because of accuracy I use everywhere text entries even for numerical entries. You seem to be storing integer values as text. What kind of accuracy improvement do you expect from this? Integers are stored losslessly already. I could re

[sqlite] Any Ideas to speed up CAST

2007-12-22 Thread Mag. Wilhelm Braun
hello, because of accuracy I use everywhere text entries even for numerical entries. So if I have to select max or min items I use cast: e.g I have exactly: 2310556 rows in the table 1. all CAST select * from "SOME_table" where cast(UTCTimestamp AS INTEGER) = (select

Re: [sqlite] select date using variables in Python

2007-12-12 Thread Mag. Wilhelm Braun
hi C M, I'm by no means an expert but what I do in similar cases is: I prepare the variables beforehand - actually I prepare the whole SQL statement beforehand and do normally not use ?. except by executemany. date=date("now","+1 day") sqlcu.execute ("SELECT string FROM test WHERE d

Re: [sqlite] Is there a way to do comparison of text in a numerical way.

2007-12-10 Thread Mag. Wilhelm Braun
Thanks for the hint. W.Braun Dennis Cote wrote: Mag. Wilhelm Braun wrote: I thought that this might properly a bigger thing. Well, I found a solution which fits my purpose at the moment. ( SELECT txt FROM test WHERE txt=(SELECT max(CAST(txt AS REAL)) from test) ) I do not use selection

Re: [sqlite] Is there a way to do comparison of text in a numerical way.

2007-12-09 Thread Mag. Wilhelm Braun
types makes the integration possible. This is not a simple fix, but it does let us produce accurate financial reports. Mag. Wilhelm Braun wrote: Thanks Stanton, could you elaborate a bit on that - I'm not sure if I get exactly what you mean. if you have a smallish example would be great

Re: [sqlite] Huge performance drop when using prepared statement

2007-12-09 Thread Mag. Wilhelm Braun
hi Markus, I just tried for fun: start = time.time() SQLString=('''SELECT * FROM entry, word, word_entry WHERE entry.id = word_entry.entry_id AND word.id = word_entry.word_id AND word.word GLOB '%s' ''' % "hui*") c.execute(SQLString) and it is as fast as your first one - seems a pysqlite

Re: [sqlite] Is there a way to do comparison of text in a numerical way.

2007-12-09 Thread Mag. Wilhelm Braun
mat, fixed point decimal numbers, right justified. Mag. Wilhelm Braun wrote: Dear all, I use sqlite to store numerical text strings. Why do I use text type: because of the float problem of incorrection.example in numeric Columns: 3.2009returns as 3.2008 which

Re: [sqlite] Re: Is there a way to do comparison of text in a numerical way.

2007-12-08 Thread Mag. Wilhelm Braun
Thanks Igor Tandetnik great help. W.Braun Igor Tandetnik wrote: Mag. Wilhelm Braun <[EMAIL PROTECTED]> wrote: is there a way to do comparison of text in a numerical way. EXAMPLE rows:Column txt "0.200899" "1.2009" "113.2008999" "4.0" &q

[sqlite] Is there a way to do comparison of text in a numerical way.

2007-12-08 Thread Mag. Wilhelm Braun
Dear all, I use sqlite to store numerical text strings. Why do I use text type: because of the float problem of incorrection. example in numeric Columns: 3.2009returns as 3.2008 which is not what I want. Column Type=TEXT is there a way to do comparison of text in a