Re: [sqlite] UPDATE statement without FROM clause

2016-06-04 Thread Gerry Snyder
If SQLite implemented the FROM it would just be a translation into the complex and slow statements you want to avoid. Gerry Snyder On Jun 4, 2016 9:19 AM, "skywind mailing lists" <mailingli...@skywind.eu> wrote: > Hi, > > I am using quite often SQL statements that upd

Re: [sqlite] Any tips on reducing memory requirements for small MCU?

2014-10-20 Thread Gerry Snyder
One possibility might be to use the long-obsolete SQLite2, which was around when PC's had much smaller memories. I know it is heresy to suggest it, and you would have a lot of recoding to do, but it seems that it might be workable. Gerry Snyder

Re: [sqlite] unicode case insensitive

2014-10-24 Thread Gerry Snyder
In a vaguely similar situation I wrote a custom collation that converted accented letters to their non-accented cousins. Since the conversion is on a case-by-case basis I also had to do a pre-screening that would show any non-ascii characters that I wasn't converting, so that I could add them

Re: [sqlite] unicode case insensitive

2014-10-24 Thread Gerry Snyder
Sorry. I am not clear. Can you please elaborate this. Thanks. On Fri, Oct 24, 2014 at 9:16 PM, Gerry Snyder <mesmerizer...@gmail.com> wrote: In a vaguely similar situation I wrote a custom collation that converted accented letters to their non-accented cousins. Since the conversion is o

Re: [sqlite] Table qualification not supported in some cases (was: quasi-bug related to locking, and attached databases)

2014-10-28 Thread Gerry Snyder
Some further comments on VIEWs: A regular (non TEMPORARY) VIEW can reference only tables in the file where it is stored. SQLite allows qualified names, but the practice should be avoided because the VIEW won't work if the file is attached under a different name. A TEMPORARY VIEW can

Re: [sqlite] Whish List for 2015

2014-12-24 Thread Gerry Snyder
ons, and I have no worries about that trend continuing. Gerry Snyder ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Safe use of custom collations that are not available in all tools

2015-03-17 Thread Gerry Snyder
gives a warning but then handles the table correctly, including ordering by the column with the missing collation. The Command Line Shell refuses to do anything with the table except .dump it.) All suggestions welcome. Gerry Snyder

[sqlite] Safe use of custom collations that are not available in all tools

2015-03-17 Thread Gerry Snyder
collations. Gerry On 3/17/2015 11:15 AM, Hick Gunter wrote: > How about coding the collation in C and statically linking it into the SQLite > library you provide with your application? > > -Urspr?ngliche Nachricht- > Von: Gerry Snyder [mailto:mesmerizerfan at gmail.com] > Gesende

Re: [sqlite] Boolean and DataReader

2014-01-29 Thread Gerry Snyder
On 1/29/2014 1:08 PM, Johnny wrote: Sorry, I have again a question about reading a sqlite db from c#. Suppose you have a simple Boolean column in a table. I want to use a .net DataReader (connected layer). My question is: Why I get a cast exception when calling the getBoolean method (solution

Re: [sqlite] Free Page Data usage

2014-02-08 Thread Gerry Snyder
Instead of delete and then insert, can you somehow just keep track of which rows are to be deleted, and when new rows come in replace if you can and otherwise insert? A little more bookkeeping, but it might save the space you need. Gerry On Feb 7, 2014 10:57 PM, "Raheel Gupta"

[sqlite] Documentation suggestion

2014-03-18 Thread Gerry Snyder
There is no mention in the write-up of "PRAGMA table_info" that it works for a VIEW as well as for a TABLE. It takes only a few seconds to verify this, but saving others the trouble of doing so seems like a good idea to me. Thank you, Ge

Re: [sqlite] SQLite sorting/searching algorithm

2014-03-25 Thread Gerry Snyder
Look at COLLATE in the ORDER BY clause. Gerry On Mar 25, 2014 11:32 AM, "michal.pilszak" wrote: > "you cannot tell SQLite to use a particular algorithm to do those things" > that's exactly what I wanted to know. So, I won't waste my time on looking > for impossible on

Re: [sqlite] sqlite dump makes wrong "CREATE VIEW" order

2014-04-17 Thread Gerry Snyder
On 4/17/2014 12:43 AM, Tyumentsev Alexander wrote: sqlite in some cases dumps views in wrong order. Interesting situation. My take on it would be that dump is a simple little tool designed to help move a database file from one place to another. In tricky situations, some editing of its

Re: [sqlite] BLOBs and NULLs

2014-04-23 Thread Gerry Snyder
On 4/23/2014 10:21 AM, Drago, William @ MWG - NARDAEAST wrote: If I was sure I wouldn't be merging data I might use timer ticks as my ID, but I'm not sure and I can't take the chance. -Bill Would it be possible to use INTEGER PRIMARY KEY AUTOINCREMENT for the ID, and manually start

Re: [sqlite] Hexadecimal integer literals

2014-07-23 Thread Gerry Snyder
I can think of situations where I would want the result to be truncated to 64 bits. I can think of situations where I would want SQLite to raise an error. I cannot imagine wanting a floating point result. Gerry Snyder

Re: [sqlite] Handling Timezones

2014-07-29 Thread Gerry Snyder
Have you read http://sqlite.org/lang_datefunc.html ? On 7/29/2014 6:41 AM, Will Fong wrote: Hi, How are timezones best handled? Since dates are stored in GMT, when I go to display them, I need to add/subtract the timezone. That's not too hard when I can just store the timezone as "-5" for

Re: [sqlite] sqlite max arguments assistance

2014-09-22 Thread Gerry Snyder
I feel sure the transaction amounts are strings, not numbers. Here is a quick example: create temp table gigo(a real) insert into gigo values ('$5.00') select a, typeof(a) from gigo gives: $5.00 text If you can remove the dollar signs in the CSV file you should do better. Hope this helps,

Re: [sqlite] .import FILE TABLE

2011-03-10 Thread Gerry Snyder
On 3/10/2011 1:28 PM, jcilibe...@comcast.net wrote: > Hello, > > > Unbelievably active user group! > > > I have been unable to import a CSV text file from MS Access to sqlite: > 1. Created a small table (3 fields and 1 record) in Access and exported it to > a CSV text file named "myCSVfile.txt" >

Re: [sqlite] Lack of "decimal" support

2011-03-26 Thread Gerry Snyder
Do money values really get multiplied together? What is the meaning of square cents as a unit? Gerry On 3/26/11, Patrick Earl wrote: > That is true, but then when you are formulating generic queries within > a place such as an ORM like NHibernate, you would need to figure

Re: [sqlite] ADV: "Using SQLite" ebook, 50% off today

2011-05-03 Thread Gerry Snyder
I learned a lot from it, too. Gerry Snyder On 5/3/11, Nico Williams <n...@cryptonector.com> wrote: > On Tue, May 3, 2011 at 11:20 AM, Simon Slavin <slav...@bigfraud.org> wrote: >> On 3 May 2011, at 5:09pm, Jay A. Kreibich wrote: >> >>>  "Using SQLite

Re: [sqlite] SQLite as a Logger: How to mimic "rotation of logs"?

2011-05-10 Thread Gerry Snyder
If this has already been suggested, I apologize. Add an integer column with a UNIQUE ON CONFLICT REPLACE constraint.Then after you figure out how many entries are enough (maxcount), insert each row, specifying that column as mod((lastinsertrowid()+1),maxcount) or however you specify a modulus

Re: [sqlite] ISNULL in sqlite

2011-06-27 Thread Gerry Snyder
On 6/25/2011 12:33 PM, logan...@gmail.com wrote: > Hello, > > How do I check for a null or empty string in SQLite. In addition to the other replies you have received, you need to be made aware that an empty string and a NULL are very different, and (perhaps) both have to be checked for,

Re: [sqlite] Database schema has changed?

2011-09-13 Thread Gerry Snyder
On 9/13/2011 8:38 AM, Tim Streater wrote: I don't see an easy way of solving conflicting absids. The hard way of solving this is to select all the fields of the messages table explicitly (except absid), so I can then insert them into a new row in the destination table. But I'm trying to avoid

Re: [sqlite] No error on selecting non-grouped column

2011-09-14 Thread Gerry Snyder
Would be pragma to reverse unordered selects show a different result? ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Command line sqlite3 program bug

2015-09-08 Thread Gerry Snyder
The Command Line Interface has the command: .bail on which will do what you want. HTH, Gerry Snyder --- On 9/8/2015 9:54 AM, Domingo Alvarez Duarte wrote: > Hello ! > > After seem several emails from a user asking about how to us

[sqlite] sqlite3 file as database

2015-09-12 Thread Gerry Snyder
Have you tried simply renaming the file? On Sep 12, 2015 8:29 AM, wrote: > Hello dears > I have a database file as database.db3 but I have to use database.sqlite3 . > How can I convert the db3 file to sqlite3 file? > Thanks for your help > sanam > ___

[sqlite] Temporary table in SQLite

2016-02-13 Thread Gerry Snyder
Short answer, Yes. Long answer, have you read the SQLite documents? Gerry On Feb 13, 2016 8:13 PM, wrote: > Hi, > > Is it possible to create a temporary table in SQLite so that it will only > be > visible to the current session and be destroyed after the session is > closed? > Just like SQL

[sqlite] Best way to store only date

2016-01-30 Thread Gerry Snyder
On Jan 30, 2016 6:18 AM, "E.Pasma" wrote: > > The diagram got broken in my email and here is another try: > > Needs to be light | Needs to be| Needs to do | > (small footprint) | Human-Readable | calculations | > - | ---| | > YES |

[sqlite] Incremental backup/sync facility?

2016-05-06 Thread Gerry Snyder
On 5/6/2016 5:32 AM, Stephan Buchert wrote: > We are using Sqlite for data from satellite Earth observations. It > works very well. Thanks to everybody contributing to Sqlite, uppermost > Dr. Hipp. > > The largest database file has now grown to about 180 GB. One feature of SQLite -- the whole

Re: [sqlite] Re: SQLite and nested transactions

2007-04-11 Thread Gerry Snyder
[EMAIL PROTECTED] wrote: Here is an excerpt from my requirements doc: If a transaction is aborted all database state is reset ("rolled-back") to its value at the time the transaction was opened. Nested transactions abort or commit relative to their parent transaction. In the case of an

Re: [sqlite] Re: SQLite and nested transactions

2007-04-15 Thread Gerry Snyder
[EMAIL PROTECTED] wrote: Gerry, I took a look at this and I don't see how it works. Sorry. I was just thinking about inserts. Gerry - To unsubscribe, send email to [EMAIL PROTECTED]

Re: [sqlite] Odd performance issue under Windows

2007-04-25 Thread Gerry Snyder
John Elrick wrote: "what the heck is happening that is creating a better than order of magnitude difference in execution time on five out of seven Windows machines?". Sounds like different filesystem behavior, such as caching, returning before the writing is actually done, etc. Gerry

Re: [sqlite] How can I convert from Julian time to a tm structure?

2007-06-13 Thread Gerry Snyder
Rob Richardson wrote: ... One thing I want to do is to move the conversion of the timestamp from a Julian time to a human-readable time from the query to my application I didn't see any little utility function in the SQLite library that just exposes whatever routine SQLite uses to do the

Re: [sqlite] Trigger update of multiple columns

2007-06-18 Thread Gerry Snyder
T wrote: Yes, that's what I'm doing. I just want to make it more efficient. Technically it's the sale_products table (since each sale has many products etc), but yes, I want to insert the transactions data (product_id, buy, sell, desc) into the sale_products table. But I want a mechanism

Re: [sqlite] Version 3.4.0

2007-06-18 Thread Gerry Snyder
[EMAIL PROTECTED] wrote: SQLite version 3.4.0 is now available for download The tcl bindings for windows appear to be missing. Is this deliberate? Thanking you for a wonderful product, Gerry - To unsubscribe,

Re: [sqlite] Version 3.4.0

2007-06-18 Thread Gerry Snyder
[EMAIL PROTECTED] wrote: Gerry Snyder <[EMAIL PROTECTED]> wrote: The tcl bindings for windows appear to be missing. Is this deliberate? Build-script bug. Now fixed. Try again, please. (Note that I have observed that the DLL is now generated in my cross-compiler environment,

Re: [sqlite] Version 3.4.0

2007-06-18 Thread Gerry Snyder
[EMAIL PROTECTED] wrote: yes. I messed up the build again. Please try one more time. -- Thanks for the quick responses. More better now. ;-) Gerry - To unsubscribe, send email to [EMAIL PROTECTED]

Re: [sqlite] Proper way to transfer a live sqlite database

2007-06-19 Thread Gerry Snyder
Michael Hooker wrote: Many thanks for the explanation Dan. Ditto the thanks. I suspected the purpose of ROLLBACK was as you say, but couldn't see why it was used here. You point out the "under the hood" difference between ROLLBACK and COMMIT, but what about END? My main (third-party,

Re: [sqlite] Re: Re[2]: The problem with index

2007-06-20 Thread Gerry Snyder
Igor Tandetnik wrote: Sergey M. Brytsko <[EMAIL PROTECTED]> wrote: But what about the following values: 1 1 2 2 100 100 100 100 100 100 100 100 100 100 100 111 111 If you susptect your data is likely to look like this, you may want to rewrite your query as SELECT BBB FROM XXX WHERE BBB <

Re: [sqlite] The problem with index

2007-06-20 Thread Gerry Snyder
[EMAIL PROTECTED] wrote: This gives a different answer because the EXCEPT operator makes the rows of the result set unique. So the result set will be: 1 2 111 where as formerly it was 1 1 2 2 111 111 Thank you for the clarification. That is not the behavior I would have expected. In my

[sqlite] [Fwd: SQLite in the News]

2007-06-23 Thread Gerry Snyder
Original Message Subject: SQLite in the News Date: Sat, 23 Jun 2007 12:25:56 + From: Keith Nash <[EMAIL PROTECTED]> Organization: Customer of PlusNet plc (http://www.plus.net) Newsgroups: comp.lang.tcl Interview with Richard Hipp in The Guardian:

Re: [sqlite] FTS2 Module

2007-06-25 Thread Gerry Snyder
Andre du Plessis wrote: I saw this post on FTS2, and looked on the site and saw the FTS2 binary, where can I find more information on this The wiki has a lot of info. Check out: http://www.sqlite.org/cvstrac/wiki?p=FtsOne http://www.sqlite.org/cvstrac/wiki?p=FtsTwo

Re: [sqlite] SQL query assistance...

2007-07-01 Thread Gerry Snyder
Jeff Godfrey wrote: Hi All, Given the following sample data... ID Name Version --- - --- 1 name1 0.9 2 name1 1.0 3 name2 1.2 4 name3 1.0 5 name3 1.7 6 name3 1.5 I need to create a query that will group the data together by Name, but for each group will return the

Re: [sqlite] Sharing an in-memory database between applications

2007-07-13 Thread Gerry Snyder
Rob Richardson wrote: that is much faster than a set of INSERT INTO newtable SELECT * FROM oldtable (or whatever -- you get the idea) statements. The fastest way should be: CREATE TABLE memdb.newtable AS SELECT * FROM oldtable HTH, Gerry

Re: [sqlite] Re: inner join

2007-07-16 Thread Gerry Snyder
RB Smissaert wrote: That is an interesting one. Where could I find documentation about coalesce? The basic description is to be found in the Core Functions section of: http://sqlite.org/lang_expr.html In a nutshell, the function returns the first non-null argument. HTH, Gerry

Re: [sqlite] Ascii data in string treated as a num

2007-07-19 Thread Gerry Snyder
Michael Flum wrote: I have a short program that requires storing of Ascii strings that happen to be numbers. It seem that when I retrieve the data it has been interrupted as a numeric value and is returned altered. I.E. "0E00" is returned as "0", "" is returned as "0", "76E0" is returned as

Re: [sqlite] Enclosing quotes

2007-07-21 Thread Gerry Snyder
T wrote: Hi All, When I rename a table, SQLite seems to override the quote characters I use, instead using single quote marks. Is this a bug? The quote characters used in creating a table are not part of the table name. SQLite just uses apostrophes, aka single quotation marks, aka single

Re: [sqlite] strategy adding indexes

2007-07-31 Thread Gerry Snyder
[EMAIL PROTECTED] wrote: http://www.sqite.org/optoverview.html In case the error in the URL above is not obvious to someone, it should be: http://www.sqlite.org/optoverview.html - To unsubscribe, send email to

Re: [sqlite] Re: Re: how do i declare and use variables in sqlite?

2007-08-03 Thread Gerry Snyder
Paul Harris wrote: ok, so a subselect can be used. not bad, but not as powerful as the mysql @ variables, which can then be used in all sorts of scenarios later, without inducing the same query over and over to get the value. SQLite is (mostly) intended to be a library for SQL execution,

Re: [sqlite] Re: Re: Re: Re: Re: Re: Re: How does SQLite choose the index?

2007-08-04 Thread Gerry Snyder
RB Smissaert wrote: I think an application that would produce all the needed indexes based on the table and all the possible queries would be helpful. Anybody done such an app? _All_ possible queries? Not practical for any significant number of columns. N factorial gets big fast. The

Re: [sqlite] Multiple fields update

2007-08-06 Thread Gerry Snyder
RB Smissaert wrote: I am sure this SQL used to be fine with SQLite: update table1 set field1 = 0 where field1 = 2, field2 = 3 where field2 = 2 Now however I get a syntax error near , Has this changed? RBS Does the thread below ring a bell? Does it help? Gerry

Re: [sqlite] sqlite3 datatype

2007-08-11 Thread Gerry Snyder
fred238 wrote: hello, Is necessary to set column datatype in sqlite3 ? Is better to use class storage in sqlite3 (TEXT, NUMERIC, INTEGER, REAL, NONE) ? Check out http://www.sqlite.org/datatype3.html and ask again here if yu have further questions. Gerry

Re: [sqlite] sqlite3 datatype

2007-08-11 Thread Gerry Snyder
fred238 wrote: Gerry Snyder a écrit : fred238 wrote: hello, Is necessary to set column datatype in sqlite3 ? Is better to use class storage in sqlite3 (TEXT, NUMERIC, INTEGER, REAL, NONE) ? Check out http://www.sqlite.org/datatype3.html and ask again here if yu have further questions

Re: [sqlite] How to unsubscribe from his group?

2007-08-13 Thread Gerry Snyder
mos wrote: Star Trek Epsiode 64, Season 3: The Tholian Web - The Real Unpublished Story When the problem gets fixed, I assume you will announce, "Ah, the renowned Tholian punctuality." Gerry - To unsubscribe, send

Re: [sqlite] Problems Getting Started

2007-08-21 Thread Gerry Snyder
PokerAce wrote: I'm using SQLite version 3.4.2 and for some reason, I cannot read from any SQLite databases. Josh, Usually this symptom means that the Browser and your application are not looking at the same file. Check paths and that sort of thing. HTH, Gerry

Re: [sqlite] Update Columns in One Table Using Values From Another Table

2007-08-23 Thread Gerry Snyder
Chris Peachment wrote: I have a database with more than 200,000 records in the core table. An update table of similar record count contains a proper subset of the core table columns. I'm looking for a fast method of merging the values in the two tables such that : 1. core table columns are

Re: [sqlite] Update Columns in One Table Using Values From Another Table

2007-08-23 Thread Gerry Snyder
Chris Peachment wrote: On Thu, 23 Aug 2007 08:52:40 -0700, Gerry Snyder wrote: Chris Peachment wrote: I have a database with more than 200,000 records in the core table. An update table of similar record count contains a proper subset of the core table columns. I'm looking for a fast

Re: [sqlite] Eliminate duplicate entries

2007-09-04 Thread Gerry Snyder
Kees Nuyt wrote: On Tue, 04 Sep 2007 07:53:08 -0600, you wrote: I have an application that is inserting a record every second. There are thousands of periods from a few seconds to hours long where the data in all the columns is identical thus causing hundreds of thousands of duplicate

Re: [sqlite] multiple databases

2007-09-19 Thread Gerry Snyder
[EMAIL PROTECTED] wrote: There are no SQLite-specific talks or tutorials this year Well, my talk Thursday afternoon is on using an SQLite database for storing Tcl/Tk scripts which are used for displaying and modifying SQLite databases. So although your statement is strictly correct, I

Re: [sqlite] test failures on cygwin

2007-09-21 Thread Gerry Snyder
Evans, Mark (Tandem) wrote: So it looks like I have a cygwin TCL issue. Is this fixable? You can load Active State Tcl and use that instead of the version that comes with Cygwin. You get lots of extra goodies, in addition to an up-to-date Tcl core. HTH, Gerry

Re: [sqlite] Sqlite occasionally becomes CPU greedy

2007-09-24 Thread Gerry Snyder
Kees Nuyt wrote: On Mon, 24 Sep 2007 07:13:51 -0700, Gururaja Nittur wrote: Sqlite experts, I am running Sqlite version 3.4.1. I ran some performance tests and observed that sqlite sometimes consumes more CPU than normal (I am using same dataset, all inserts and recreating new database for

Re: [sqlite] Insert query very slow

2007-10-21 Thread Gerry Snyder
Givernaud Omar wrote: Hello, I made a "hello world" program in order to test SQLite, but it is very slow : I am trying to set 1000 INSERT in a database. The time average is 2m30s on a AMD Athlon(TM) XP 2400+ with 1Go Ram however http://www.sqlite.org/speed.html My code

Re: [sqlite] DB managers that do searches?

2007-10-30 Thread Gerry Snyder
Bernie Cosell wrote: I'm trying to correct several little problems in a DB I have and I've now tried three [maybe four] freeware DB managers and not one includes a search function. Do you mean sorting a table on a text column, typing in a few characters, and then going to the row that

Re: [sqlite] Converting date from d/m/yy format

2007-11-02 Thread Gerry Snyder
T wrote: Hi all, How can I convert dates from the format d/m/yy to SQL style YYY-MM-DD? I would suggest either [scan] or [regexp] , with the former probably being easier. Gerry - To unsubscribe, send email to

Re: [sqlite] Re: A beginner SQL question

2007-11-05 Thread Gerry Snyder
Igor Tandetnik wrote: A.J.Millan <[EMAIL PROTECTED]> wrote: Suppose a table: CREATE TABLE 'myTable' ( A INTEGER NOT NULL, B INTEGER NOT NULL, C INTEGER); Do is there some query to return if there are some duplicate files and/or who are they? Consider duplicate file if there are two or more

Re: [sqlite] Suggests for improving the SQLite website

2007-11-09 Thread Gerry Snyder
[EMAIL PROTECTED] wrote: A rough prototype of what a revised website might look like can be seen at http://sqlite.hwaci.com/ Short, simple, and sweet. I like it. My only specific comment was going to be a request to make the page for datatypes easy to find. Until I made it a book

Re: [sqlite] is safe to use the same database connection at the same time in more than one thread?

2007-11-10 Thread Gerry Snyder
Don Lavelle wrote: Hello, all, First, I apologize if the list has received multiple copies of e-mails from me. I'm using gmail, and gmail does strange things to e-mails when receiving through a POP client an e-mail that is from your own account. Your email made it to the list. I also

Re: [sqlite] Version 3.5.3

2007-11-27 Thread Gerry Snyder
The tclsqlite.dll file will follow soon? Gerry - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] Version 3.5.3

2007-11-27 Thread Gerry Snyder
[EMAIL PROTECTED] wrote: Gerry Snyder <[EMAIL PROTECTED]> wrote: The tclsqlite.dll file will follow soon? Try it now, please. Downloaded and in use. Thanks much. I hope that things work out and you are able to keep including FTS3 in the binaries. I think it will be

Re: [sqlite] Casting bug

2007-12-13 Thread Gerry Snyder
T wrote: When I try: select cast( 141.70 * 100 as integer) I get 0.69, but should get 0.70 Assuming you mean you got 14169, maybe you should look at http://sqlite.org/faq.html#q16 HTH, Gerry - To unsubscribe,

Re: [sqlite] How to convert the GMT time to date time format

2007-12-18 Thread Gerry Snyder
Joanne Pham wrote: Sorry! I am very new to SQLite. Where is Wiki page. Thanks, Joanne http://www.sqlite.org/cvstrac/wiki It is available via the Developers menu. I strongly recommend spending some time browsing around the SQLite web site. There is a huge amount of information there.

Re: [sqlite] Helping with table definition?

2007-12-25 Thread Gerry Snyder
Cesar D. Rodas wrote: Hello, Merry Christmas for every one! I am wondering if someone did a function (the language doesn't care very much) to get the table information and want to share him/her code. Here's some Tcl code that may help. It does more than look at the SQL, but that part may

Re: [sqlite] Next Version of SQLite

2008-01-13 Thread Gerry Snyder
Joe Wilson wrote: --- "D. Richard Hipp" <[EMAIL PROTECTED]> wrote: There are people on this mailing list (ex: Joe Wilson) who appear to read every line of every change that we make to SQLite, within minutes of making them, and complain if we so much as misspell a word in a comment. And I

Re: [sqlite] Date arithmetic question

2008-01-17 Thread Gerry Snyder
[EMAIL PROTECTED] wrote: So datediff('month', '2008-02-01 23:59:59','2008-01-31 00:00:00') should return 1 even though the difference is really only 1 second? Seems goofy to me I have been staring at this until I'm getting goofy. Written as it is, isn't the time interval 1 second

Re: [sqlite] Selecting ID for MAX() + GROUP BY

2008-02-04 Thread Gerry Snyder
P Kishor wrote: > > > sqlite> select t.* from test t join (select name, max(weight) as m > from test group by name) w on t.weight = w.m and t.name = w.name; > To me the following almost identical query is more readable, but I guess it is objectively better only if you are having trouble with

Re: [sqlite] tclsqlite

2008-02-09 Thread Gerry Snyder
dick128 wrote: > I have a tcl app that I want to use tclsqlite with but when I load the dll > tcl exits without any error messages. did catch, etc. still exits. tries > 3.5.4 and 3.5.6 - same result. > What version of Tcl? I have used all of the recent tclsqlite3.dll files with almost all of

Re: [sqlite] WHERE clause syntax error

2006-06-17 Thread Gerry Snyder
James W. Walker wrote: Let's say I have two tables A and B, each of which has an integer ID column. I want to find ID values that occur in A but not B. The first query I came up with was: SELECT ID FROM A WHERE NOT EXISTS (SELECT * FROM B WHERE B.ID = A.ID); but I get a syntax error. My

Re: [sqlite] Virtual tables

2006-06-23 Thread Gerry Snyder
[EMAIL PROTECTED] wrote: http://www.sqlite.org/cvstrac/wiki?p=VirtualTables This is a feature currently under active development. -- D. Richard Hipp <[EMAIL PROTECTED]> Wow! I really look forward to the day when this and full-text search are ready for prime-time use (including

Re: [sqlite] Multiple Users

2006-07-03 Thread Gerry Snyder
[EMAIL PROTECTED] wrote: Hi to all ... any questions... ;-) How many Users can operate with one SQLite-DB at the same time? Anne, Look at the following documentation, and if you have further questions, do not hesitate to ask: http://sqlite.org/lockingv3.html Gerry

Re: [sqlite] Syntax Errors with various strings?

2006-07-05 Thread Gerry Snyder
Gussimulator wrote: Thanks Christian, I'll give it a shot later. Just because using quotation marks (did a quick macro that adds them to my string) did the job, doesnt mean its a better solution than this one. In particular, if your strings include the ' character, you will need to double

Re: [sqlite] insert default values

2006-07-28 Thread Gerry Snyder
Mario Frasca wrote: I'm trying to use default values and autoincrementing primary keys. [EMAIL PROTECTED]:~$ sqlite3 /data/mariof/test.db_scia.db SQLite version 3.3.4 Enter ".help" for instructions sqlite> create table test(f int auto_increment primary key, v int default 0); The above is

Re: [sqlite] insert default values

2006-07-28 Thread Gerry Snyder
Mario Frasca wrote: and how do I insert a 'all-default' record? After getting everything else right (see my previous post): sqlite> insert into test (f) values (NULL); sqlite> select * from test; 1|1 2|2 3| 4|0 And this answers my previous comment, too. Inserting a NULL into v overrides

Re: [sqlite] UTF8

2006-08-01 Thread Gerry Snyder
Cesar David Rodas Maldonado wrote: Thanks Daniel! Now i have another question! Is any way to serialize all the dates given a preference to SELECT a delay to the insert. I am building a Small Library in C & SQLite that will be under GPL, is something like Lucene. Please help me how to give a

Re: [sqlite] From Windows file format to MacOSX

2006-08-04 Thread Gerry Snyder
Alexander Lamb wrote: So it is not possible to create a database with the legacy file format using the command line on Windows and SQLite 3.3? Yes it is. Reread Dr. Hipp's point (2) below. If I understand correctly, I need to grab the latest CVS version of SQLite to have the 3.3 format

Re: [sqlite] From Windows file format to MacOSX (unsuccessfull, still)

2006-08-04 Thread Gerry Snyder
Alexander Lamb wrote: Well, I even tried to insert a row in the table. The table contains the data. The file on the disk is 2K length. The PRAGMA commands tells me I am in legacy file format mode (1) but when I quit then return, I am back to 0! I just tried the same thing and got

Re: [sqlite] SQLite_master information on website

2006-08-06 Thread Gerry Snyder
John Newby wrote: Hi, can anyone direct me to the right page relating to the sqlite_master table please, I am unable to find it on the website. I do not know of a single complete description (other than the source code). The table is discussed near the bottom of the CREATE TABLE page in the

Re: [sqlite] Reading a damaged database file?

2006-08-16 Thread Gerry Snyder
Olaf Beckman Lapré wrote: I've done some tests by modifying the .db file with a hex editor, to simulate a corrupt database How do I repair the database? I can think of only two possibilities other than the things already discussed in this thread: 1) Undo the modifications made with

Re: [sqlite] Re: fault tolerance

2006-08-17 Thread Gerry Snyder
Olaf Beckman Lapré wrote: For me this is simply a must! I'm using SQLite in my e-mail client which I hope will be one of the first large scale deployments of SQLite where it will be used heavily on a daily basis. I think you are too late to claim this honor. If the database is corrupted then

Re: [sqlite] Re: Using Wrong Date Format

2006-08-18 Thread Gerry Snyder
Igor Tandetnik wrote: Eoin Collins <[EMAIL PROTECTED]> wrote: The database I'm currently using has a field Date Of Birth, and all enteries in are in dd-mm- format. I need them in -mm-dd format. update tableName set DOB=substr(DOB,7,4)||'-'||substr(DOB,4,2)||'-'||substr(DOB,1,2);

Re: [sqlite] indexes with ORDER BY on columns from different tables

2006-08-19 Thread Gerry Snyder
Jonathan Ellis wrote: On 8/19/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: "Jonathan Ellis" <[EMAIL PROTECTED]> wrote: > When ordering by columns from two tables, sqlite isn't using the index > on the first column. > > explain query plan SELECT * > FROM files f, file_info fi > WHERE f.id =

Re: [sqlite] Using Between in SQL

2006-08-30 Thread Gerry Snyder
Roger wrote: But is this a Code design issue because Between A and D is supposed to be inclusive. It is. Any Surname which consists of the single character "D" will be included. Which is just what you told sqlite to check for. You need to check for the first char of the name being

Re: [sqlite] hi

2006-09-11 Thread Gerry Snyder
abiramip wrote: hi, how can i import gif or jpg files into SQLite database and how can i export the same image to the local system? thanks in advance... Hello, Frequently it is better to store just the file names in the database and keep large files separate, so you should consider

Re: [sqlite] reg:BOLB data

2006-09-13 Thread Gerry Snyder
sandhya wrote: Hi, I created a table with fileds filename and the value of type text and BLOB respectively... I stored a file and checked whether it is existing or not from command prompt with sqlite3 exe..It is displaying but the problem is i can able to see the whole content of the file

Re: [sqlite] reg:Sqlite API's

2006-09-15 Thread Gerry Snyder
sandhya wrote: Hi all, Can you please tell me the usage of sqlite_prepare() /sqlite_exec() Have you looked at the SQLite source code? The stand-alone executable should be of help. I believe it is shell.c HTH, Gerry

Re: [sqlite] Concurrency with writer and read-only processes

2006-09-15 Thread Gerry Snyder
Liam Healy wrote: I have a database that has one writer which runs once a day, and potentially many readers running whenever someone wants some information. I am trying to understand concurrency in sqlite3 so that I can have the writer run each day, regardless of whether a reader is already

Re: [sqlite] import syntax and null values

2006-10-02 Thread Gerry Snyder
Fred Williams wrote: Would it not be more logical to modify the .import command to place a null value in a column where the input value is non existent? (i.e. Back to back separators in the input) Null in, null out. A null is not the same thing as an empty string. Some things would be

[sqlite] Is something special to load fts1.dll in Tcl?

2006-10-09 Thread Gerry Snyder
I am eager to try out full text search using SQLite and Tcl on WinXP. I downloaded the Tcl bindings and executable for SQLite 3.3.8 and the fts1.dll file, and copied them all (after unzipping) to a directory. The fts1.dll loads fine using the stand-alone executable, but I get a "not

Re: [sqlite] Is something special to load fts1.dll in Tcl?

2006-10-09 Thread Gerry Snyder
[EMAIL PROTECTED] wrote: FTS1 is built into the starkit. So if you use the starkit, there is nothing to do to enable full-text search. It's just there. I thought I did the same for the TCL DLL as well - FTS1 is built in. But I admit that I might have not gotten that exactly right. Did you

Re: [sqlite] fts2 (full-text search v2) checked into CVS.

2006-10-13 Thread Gerry Snyder
Cesar David Rodas Maldonado wrote: Ok. I have another question. I compile SQLite (the last version 3.3.8) with this fts2 extension. So how can i index something (i mean with the SQL). A good reference for using fts1 or fts2 is available at URL: http://www.sqlite.org/cvstrac/wiki?p=FtsOne

Re: [sqlite] Changing order

2006-11-12 Thread Gerry Snyder
Bambero wrote: Hello I have little problem with changing order of rows. I have a simple table articles: CREATE TABLE articles ( id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, title VARCHAR, content VARCHAR, order INTEGER UNIQUE, ); when inserting row order is a copy of id (trigger used). I

  1   2   3   >