Re: [sqlite] New word to replace "serverless"

2020-01-27 Thread Gerry Snyder
I think of it as being "standalone." Gerry Snyder On Mon, Jan 27, 2020, 3:19 PM Richard Hipp wrote: > For many years I have described SQLite as being "serverless", as a way > to distinguish it from the more traditional client/server design of > RDBMSes. "S

Re: [sqlite] Upgrading from version 3.6.16 to 3.30.1

2020-01-04 Thread Gerry Snyder
estimate for number of issues you will run into is Zero. Gerry Snyder ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Difference between hex notation and string notation

2019-12-13 Thread Gerry Snyder
I would suggest that if you ran: SELECT ROWID,MSG,typeof(MSG) FROM LOG; and read https://sqlite.org/datatype3.html you would have a better idea of what is going on. You might still consider it a but, but it is expected behavior. Gerry On Fri, Dec 13, 2019 at 8:51 AM Sascha Ziemann wrote: >

Re: [sqlite] what is the optimized way to do the vaccum?

2019-12-04 Thread Gerry Snyder
On Wed, Dec 4, 2019, 9:28 PM Zhu, Liang [AUTOSOL/ASSY/US] < liang@emerson.com> wrote: > All Sqlite Expert, > > I have one table, I am inserting and deleting record to and from this > table very 250ms. I always maintain 1000 rows in this table. I have > another table, I am inserting and

[sqlite] Slight problem compiling Tcl bindings -- can't strip .dll file

2019-10-14 Thread Gerry Snyder
l C:\MinGW\bin\strip.exe: unable to rename 'sqlite3301.dll'; reason: Permission denied But the funniest thing is that after the attempted strip the .dll disappears. If copied before the strip, the .dll functions. Strange. Gerry Snyder ___ sqlite-use

Re: [sqlite] Failing SQLite .import returns exit status 0

2019-06-08 Thread Gerry Snyder
A constraint doing its job is not an error. On Fri, Jun 7, 2019, 7:49 PM Faheem Mitha wrote: > > Hi, > > Consider the following shell script: > > rm -f empty.db empty.csv > echo "" > empty.csv > echo "a, b" >> empty.csv > sqlite3 empty.db \ > 'DROP TABLE IF EXISTS empty;' \ > '.mode csv' \ >

Re: [sqlite] Custom aggregate functions in Tcl

2019-01-29 Thread Gerry Snyder
I hope your work makes into the SQLite source code. It will be useful. Gerry Snyder On Tue, Jan 29, 2019 at 12:16 AM Andy Goth wrote: > I wish to define custom aggregate functions in Tcl, but this capability is > currently not exposed through the Tcl interface. Thus I am thinking about

Re: [sqlite] Question about floating point

2018-12-19 Thread Gerry Snyder
On Wed, Dec 19, 2018 at 4:57 PM Keith Medcalf wrote: > > > >All I meant was that with a decimal exponent, the units could be > >dollars, > >and additions and subtractions of cents would be exact (assuming the > >mantissa has enough bits), with no worries about rounding. Which is > >the > >basis

Re: [sqlite] Question about floating point

2018-12-19 Thread Gerry Snyder
On Mon, Dec 17, 2018 at 10:04 AM Larry Brasfield wrote: > Gerry Snyder wrote: > < I don't think anyone has pointed out that the "evil" is not floating > point, it is the binary exponent. > > Disregarding the “evil” appellation, the fundamental fact is that, with >

Re: [sqlite] Question about floating point

2018-12-17 Thread Gerry Snyder
cessors/computers have hardware for that these days? > > > I don't think anyone has pointed out that the "evil" is not floating point, it is the binary exponent. Just have the exponent be a decimal number, and accept that the mantissa may have some high-order zeroes. Gerry Snyder _

Re: [sqlite] Persistent snapshots and rollbacks

2018-10-05 Thread Gerry Snyder
can have multiple copies of it, backup and restore could be a cumbersome way to do what you want. Gerry Snyder ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] GROUP BY [Re: unique values from a subset of data based on two fields]

2018-06-30 Thread Gerry Snyder
If you want the row with the minimum B, and the row with a minimum C, then the union of two queries would seem to be appropriate. Gerry Snyder On Sat, Jun 30, 2018, 6:45 AM Luuk wrote: > > > On 30-6-2018 15:39, Abroży Nieprzełoży wrote: > >> SELECT > >>a, >

Re: [sqlite] How to Handle BigInt

2018-05-01 Thread Gerry Snyder
From the docs: *INTEGER*. The value is a signed integer, stored in 1, 2, 3, 4, 6, or 8 bytes depending on the magnitude of the value. So perhaps you should have said " SQLite integers are all up to 64 bit." Gerry On Tue, May 1, 2018 at 8:56 AM, Paul Sanderson

Re: [sqlite] JDBC driver experience

2018-04-22 Thread Gerry Snyder
. None. After learning how to use it I have had no problems. Gerry Snyder On Wed, Apr 18, 2018 at 12:34 PM, Richard Hipp <d...@sqlite.org> wrote: > Are you using SQLite with JDBC? If so, can you please answer a few > questions below? > > You can post on this mailing list

Re: [sqlite] Good resources for TCL/TK

2017-12-04 Thread Gerry Snyder
Sorry, I did not notice that your question was about exec rather than expr. Gerry On Dec 4, 2017 8:40 AM, "Gerry Snyder" <mesmerizer...@gmail.com> wrote: > No. One set of braces around the whole list of arguments. > > Gerry > > On Dec 4, 2017 8:27 AM, "Ceci

Re: [sqlite] Good resources for TCL/TK

2017-12-04 Thread Gerry Snyder
No. One set of braces around the whole list of arguments. Gerry On Dec 4, 2017 8:27 AM, "Cecil Westerhof" <cldwester...@gmail.com> wrote: > 2017-12-04 15:24 GMT+01:00 Gerry Snyder <mesmerizer...@gmail.com>: > > > It is always a good idea to put the argumen

Re: [sqlite] Good resources for TCL/TK

2017-12-04 Thread Gerry Snyder
It is always a good idea to put the arguments of [expr] in braces. That way they are byte-compiled. Gerry On Dec 4, 2017 6:33 AM, "Cecil Westerhof" wrote: > 2017-11-19 23:00 GMT+01:00 jungle boogie : > > > Thus said Cecil Westerhof on Sat, 18

Re: [sqlite] Many ML emails going to GMail's SPAM

2017-11-23 Thread Gerry Snyder
from all the posts there. Thank you, Gerry Snyder (55 years of working with computers and still an ignoramus) On Tue, Nov 21, 2017 at 7:30 AM, Richard Hipp <d...@sqlite.org> wrote: > On 11/21/17, Paul Sanderson <sandersonforens...@gmail.com> wrote: > > Coincidence! I have

Re: [sqlite] Enforcing uniqueness from multiple indexes

2017-08-18 Thread Gerry Snyder
Should it be : CREATE UNIQUE INDEX ... Gerry Snyder On Aug 18, 2017 4:47 AM, "Richard Hipp" <d...@sqlite.org> wrote: > On 8/18/17, Wout Mertens <wout.mert...@gmail.com> wrote: > > > > So, bottom line, is there a way to insert or replace a row so that fi

Re: [sqlite] Possible inaccuracy in "Isolation In SQLite" paper

2017-07-18 Thread Gerry Snyder
"Deferred means that no locks are acquired on the database until the database is first accessed. Thus with a deferred transaction, the BEGIN statement itself does nothing to the filesystem. Locks are not acquired until the first read or write operation." On Jul 18, 2017 6:10 AM, "Gwendal Roué"

Re: [sqlite] Bulk load strategy

2017-05-17 Thread Gerry Snyder
es pertain just to the 150k rows immediately preceding them, > could you put each 150k chunk into its own table, and then do a join when > accessing the data? Or even a merge at that point? Could be a lot faster. > > Gerry Snyder ___ sqlite-users

[sqlite] unlock_notify missing from Tcl interface writeup

2017-03-30 Thread Gerry Snyder
The Tcl docs have a reference to unlock_notify but the link does not go anywhere. Gerry Snyder ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Can sqlite3_blob_write be done through SQL?

2017-03-05 Thread Gerry Snyder
Would it be possible for you to write the other columns just once, after all the blob has been inserted? On Mar 4, 2017 4:34 PM, "Yuri" wrote: > On 03/04/2017 01:22, Clemens Ladisch wrote: > >> Do you have a concrete example for such a statement? >> > > > Yes. I need to

Re: [sqlite] SQLite IN operator on a Tcl list

2016-09-25 Thread Gerry Snyder
This gets asked once in a while, and the answer is "No." The SQL statements used in Tcl get compiled, and the compiled statement has to know how many values are being looked at by IN. At least up til now. Perhaps having row values will change this. We should know soon. Gerry Snyder O

Re: [sqlite] SQLite 3.15.0 scheduled for 2016-10-14

2016-09-23 Thread Gerry Snyder
Just curious--will Tcl lists be usable as row values? Gerry Snyder On Thu, Sep 22, 2016 at 12:04 PM, Richard Hipp <d...@sqlite.org> wrote: > Our current schedule for the next SQLite release (3.15.0) is for > 2016-10-14. > > Your beta-tests are appreciated. You can get a pr

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

[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

[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] 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] 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] 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

[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

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

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] 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] 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] 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] 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] 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] 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] 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] 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] 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

[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] 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"

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] Performing Multiple SQL Statements Within A Transactions Using TCL

2013-10-10 Thread Gerry Snyder
On 10/10/2013 2:14 PM, Tilsley, Jerry M. wrote: All, Does anybody have any examples of wrapping multiple SQL insert/update statements in a transaction using the TCL API? Sure: db transaction { db eval {create table if not exists s2011.tclcode(procname text, version text, tcl text,

Re: [sqlite] multiple connection to the same DB

2013-09-22 Thread Gerry Snyder
My track record of giving helpful advice here is not great, but this does not sound like an NFS problem to me. Your example made it look like everyone is logging into the server, and running the SQLite executable located there, rather than running an executable located on their own machine

Re: [sqlite] SQLite clusters?

2013-09-17 Thread Gerry Snyder
On 9/17/2013 8:51 AM, Tony Papadimitriou wrote: A "temp" view, however, can access table from different DBs. - Thank you. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLite clusters?

2013-09-17 Thread Gerry Snyder
to the tables in the db file where it resides, and have received error messages whenever I tried to access another file's tables. Gerry Snyder ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite

Re: [sqlite] Literature on the information theory behind SQL(lite)?

2013-08-26 Thread Gerry Snyder
O'Reilly just started a 50%-off sale on all ebooks (60% on orders of $100 or more), good through Sept. 10. A good chance to pick up these or anything else, SQL-oriented or otherwise. The discount code* *is B2S3 (but is also shown on the website). Gerry * * On Thu, Jul 18, 2013 at 5:31 AM,

Re: [sqlite] System.Data.SQLite: Leading zeros being stripped off

2013-07-15 Thread Gerry Snyder
the column to have TEXT affinity. HTH, Gerry Snyder ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLite database on Dropbox, Google Drive, MS SkyDrive, Ubuntu One or SAMBA share

2013-07-03 Thread Gerry Snyder
On 6/27/2013 12:38 PM, joe.fis...@tanguaylab.com wrote: Anyone, Does anyone have good or bad experiences using a SQLite database in a shared folder? The 'Dropbox / Drive / SkyDrive / One' I use Dropbox for SQLite files a lot. If I am not careful to be making changes to a file on only

[sqlite] configure file is missing from sqlite-autoconf-3071600/tea directory

2013-03-18 Thread Gerry Snyder
Probably why the file is a bit smaller than other recent ones. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] What is the easiest way of changing the field type?

2012-12-02 Thread Gerry Snyder
On 12/2/2012 1:52 PM, Igor Korot wrote: So, does this mean that I need to drop the DB in the text file, edit it and then re-create it from this file? How to make alterations to a table that can not be done with the ALTER TABLE command is outlined in topic 11 of the FAQ:

Re: [sqlite] Status analyze with Sqlite

2012-11-22 Thread Gerry Snyder
On 11/22/2012 4:47 PM, Steffen Mangold wrote: HI sqlite community, I have a problem I get stucked, maybe someone can help me. :( My issue: For instance if we have 10 rows with following data ID | TimeStamp | Status 0

Re: [sqlite] DELETE Query Assistance Please

2012-09-24 Thread Gerry Snyder
On 9/24/2012 9:25 AM, Don Goyette wrote: So, I still need to know how to convert the Excel format timestamp (Days since 1900-01-01) into a Unix Epoch format timestamp (Seconds since 1970-01-01). I agree with Bart's reply, but to convert epochs, subtract the Excel format timestamp of

Re: [sqlite] Count(*) help

2012-09-16 Thread Gerry Snyder
On 9/16/2012 9:17 AM, John Clegg wrote: I have a table Members with 896 rows and a text field "Year2012". It contains "Paid" 156 times, "Comp" 13 times and the rest are null (confirmed in sqlitebrowser as "empty") Back in the olden days when this table was in Access, select count("Year2013")

[sqlite] Tcl binaries for SQLite 3.7.14, Win & Linux

2012-09-04 Thread Gerry Snyder
Hello, all, I like to keep up with SQLite deliveries, and have started compiling the Tcl bindings for Win 32 and Linux 32. If anyone would like them, they are available at: https://www.dropbox.com/sh/1ropl1g9xsif1ci/Vc2l-zUEgp Both binaries were compiled with ./configure, make, and strip.

Re: [sqlite] is SQLite the right tool to analyze a 44GB file

2012-05-07 Thread Gerry Snyder
The file name does not necessarily have anything to do with the table name. On May 7, 2012 2:25 PM, "peter korinis" wrote: > Simon > > I searched the entire disk for the table name and no matches. > > > > pk > > > > ___ >

Re: [sqlite] Concurrency

2012-04-30 Thread Gerry Snyder
On 4/30/2012 5:10 PM, Sean Cui wrote: Here is a simple scenario to explain what the OP meant: Under WAL mode, In connection A, we issue SQL "UPDATE Employee SET Salary=0" to SQLite. While the command is executing, from another connection, we issue "SELECT Salary FROM Employee". In this

Re: [sqlite] Why are two select statements 2000 times faster than one?

2012-04-15 Thread Gerry Snyder
At worst you could use another table to keep track of the maximum and minimum, and update it with triggers when something is added to or deleted from the virtual table. ___ sqlite-users mailing list sqlite-users@sqlite.org

[sqlite] Problem compiling Tcl bindings on Win

2012-04-03 Thread Gerry Snyder
I thought it might be nice to be able to keep my Tcl bindings for SQLite up to date, so I downloaded the autoconf tarball on both my linux and Win (Vista) machines. Not surprisingly, the compile went fine on linux. On Windows I also downloaded and installed MSYS / MINGW. I got into the tea

Re: [sqlite] replacing several nested queries and UNION ALLs with one query

2012-02-20 Thread Gerry Snyder
a2 != '' seems redundant when a1 = a2 and a1 != '' ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] ALTER TABLE

2012-02-06 Thread Gerry Snyder
On 2/6/2012 9:22 AM, Bill McCormick wrote: Sorry, I should have mentioned that I did see that, but it doesn't quite fit my application. I need a script that doesn't care what the existing table looks like. In my situation, I may have dozens of databases among different locations, perhaps not

Re: [sqlite] ALTER TABLE

2012-02-06 Thread Gerry Snyder
On 2/6/2012 8:36 AM, Bill McCormick wrote: Is there no way to force columns added to a table with alter table to be added at certain column positions? Alternatively, if there is some way to save the data in an existing table; drop the table; re-create the table with the desired schema; and

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

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] 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] 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] 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] 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] .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" >

[sqlite] Prescott Iris Soc

2011-03-04 Thread Gerry Snyder
-- Sent from my mobile device ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Unexpected cascading delete

2011-01-12 Thread Gerry Snyder
On 1/12/2011 2:54 PM, Duquette, William H (318K) wrote: > I've just discovered that a REPLACE can trigger a > cascading delete. Is this expected behavior? > > I have an undo scheme where I grab entire rows from the > database before they are changed; then, on undo I > simply put the rows back

Re: [sqlite] How to write Query to do this?

2010-12-13 Thread Gerry Snyder
On 12/13/2010 7:55 AM, steve mtangoo wrote: > Yes, ID is autoincrement and hence sequential. > The problem with using it is, I have to know the ID of the beginning (for eg > Book 1 Chapter 1 Verse 2) and the Id of the end (eg Book 4 Chapter 10 Verse > 3). Then Simple BETWEEN will resolve it. > >

Re: [sqlite] How to write Query to do this?

2010-12-13 Thread Gerry Snyder
On 12/13/2010 6:54 AM, steve mtangoo wrote: > I have a script that is supposed to query the Bible scriptures between two > intervals. My table is named Bible and have columns: ID (int), Book (int), > Chapter(int), Verse (int) and Scripture(text). Is your ID column a sequential numbering of the

Re: [sqlite] How to optimize this simple select query ?

2010-12-09 Thread Gerry Snyder
On 12/8/2010 9:56 AM, Vander Clock Stephane wrote: > Hello, > > on the table : > > CREATE TABLE HASH( > ID INTEGER PRIMARY KEY ASC, > x1_y1 INTEGER, > x1_y2 INTEGER, > ... > x5_y5 INTEGER > ); > CREATE INDEX HASH_X1_Y1_IDX ON HASH (X1_Y1); > CREATE INDEX HASH_X2_Y2_IDX ON HASH

Re: [sqlite] Possible bug: wrong query result when using an index

2010-12-05 Thread Gerry Snyder
On Sun, Dec 5, 2010 at 7:25 AM, Gavrie Philipson wrote: > Hi, > > > The query is as follows: > > SELECT entry_type AS entry_type_int, entry_types.name as > entry_type_name, entry_id > FROM timeline JOIN entry_types ON entry_type_int = entry_types.id > WHERE >

Re: [sqlite] [ADV] 60% off "Using SQLite" and other O'Reilly ebooks

2010-11-29 Thread Gerry Snyder
I bought this book on opening day and now can highly recommend it. It is a very useful supplement to the online docs. The info is pretty up-to-date, but SQLite keeps advancing so the most recent enhancements perforce are missing. For example, wal mode is not covered, but there is a good

Re: [sqlite] sqlite_sequence table

2010-11-16 Thread Gerry Snyder
On 11/16/2010 2:14 PM, Duquette, William H (316H) wrote: > Howdy! > > According to the docs on sqlite.org, a table with "INTEGER PRIMARY KEY > AUTOINCREMENT" gets an entry in the sqlite_sequence table. I've got some > code that contains such a table; but if I query the sqlite_sequence table I

Re: [sqlite] SQLite database sync

2010-10-06 Thread Gerry Snyder
Keep track of changes, keep track of backups. On 10/6/10, David Haymond wrote: > If I copy, I don't want to transfer EVERY record to the server each time I > sync, because that would be a waste of bandwidth. What is the best way to > copy only those records that have

Re: [sqlite] Query suggestion?

2010-09-09 Thread Gerry Snyder
On 9/9/2010 11:32 AM, Doug wrote: > Thank you Igor. > > You've helped me before with what also turned out to be a similar > select referencing the same table twice. I guess it's a concept > that I don't fully get. If there is a name for this technique > I'll go Google and study up on it. >

Re: [sqlite] "Using SQLite" - O'Reilly Deal of the Day

2010-08-24 Thread Gerry Snyder
On 8/24/2010 8:09 AM, Jay A. Kreibich wrote: > >"Using SQLite" has gone to press! To celebrate, "Using SQLite" is >is today's O'Reilly "Ebook Deal of the Day." And quite a deal it is! Thank you for posting the announcement, Jay. I had just been wondering what book to start reading on

Re: [sqlite] Why the deadlock?

2010-08-24 Thread Gerry Snyder
Er, did you not see Dan Kennedy's comments a fed days ago?? On 8/24/10, Nikolaus Rath wrote: > Nikolaus Rath writes: >> Still no one able to clarify the issues raised in this thread? >> >> Let me try to summarize what I still don't

Re: [sqlite] Using variable is queries

2010-07-30 Thread Gerry Snyder
On 7/30/2010 5:40 AM, Igor Tandetnik wrote: > chris23879 wrote: >> I'm tring to create a paging function in sqlite. Is it possible to declare >> and use a variable in sqlite. > No. But since SQLite is embedded in your application, you can use variables > in your

Re: [sqlite] problems with running test suite

2010-07-29 Thread Gerry Snyder
package require Tcl 8.5 is all it takes Gerry On 7/29/10, Richard Hipp wrote: > On Thu, Jul 29, 2010 at 4:44 PM, Paweł Hajdan, Jr. > wrote: > >> I'm planning to contribute some patches (upstreaming patches Chromium >> project applies to its local copy

Re: [sqlite] Help with complex UPDATE question

2010-07-23 Thread Gerry Snyder
On 7/23/2010 10:09 AM, Jim Morris wrote: > What you are trying to do is unclear to me. It seems that table1 > doesn't have enough data to unambiguously identify the rows. > > On 7/23/2010 8:03 AM, peterwinson1 wrote: >> Thanks Eric and Alan for your help. I tried to apply your code to my

[sqlite] Is there busy handling in SQLite jdbc drivers?

2010-07-12 Thread Gerry Snyder
I could not find any information on either the zentus or xerial websites on any built-in provisions for busy handling. Did I miss it, or is the functionality there but not documented, or do I need to check error codes and retry in my code? TIA, Gerry

Re: [sqlite] How to determine when to VACUUM?

2010-07-06 Thread Gerry Snyder
On 7/6/2010 2:58 PM, Kristoffer Danielsson wrote: > What you are saying makes sense. Thanks for your advice! > > > > However, I do believe there are times when vacuuming would be beneficial. For > instance, if a database for software X is detected to have 90% unused space > for a couple of

Re: [sqlite] EXTERNAL:Re: How to select an entry that appears <=ntimes and only show n times if it appears more than n times?

2010-07-02 Thread Gerry Snyder
On 7/2/2010 10:09 AM, P Kishor wrote: > I was going to add "That is an Igor-question" to "I don't know how to > do that with sql." I have no idea how you do this, but if ever I meet > you in person, I will be too awestruck to say anything beyond > "SELECT.." > From me it would more likely

Re: [sqlite] unexpected large journal file

2010-06-19 Thread Gerry Snyder
On 6/18/2010 7:01 PM, Scott Hess wrote: > > The old-school solution to this problem is an external sort (*). The > basic idea is that you process the incoming data in memory-sized > chunks (ie, fast), then write out sorted subfiles. Then you process > the sorted files in parallel, merging to the

Re: [sqlite] select %column% from table

2010-04-30 Thread Gerry Snyder
So why not columns keyword and value? Gerry On 4/30/10, David Lyon wrote: > Thanks for everyones efforts let me expand: > > > if I had many many files like this: > http://research.stowers-institute.org/efg/ScientificSoftware/Utility/FCSExtract/CC4_067_BM.txt > > you see 2

Re: [sqlite] Direct access of table data

2010-04-23 Thread Gerry Snyder
How long would it take to test using an index with 18 fields? Might not be crazy. Gerry On 4/23/10, Nathan Biggs wrote: > Max, thanks for the information. That will be very useful for other > table queries, but not for this one. For my table in questions there > are 18

Re: [sqlite] sqlite-users Digest, Vol 23, Issue 26

2009-11-26 Thread Gerry Snyder
Peter Haworth wrote: > > I have this question too. I'm not programming in C so don;t have > access to the sqlite_last_insert_rowid > Yes you do. You just didn't realize it. Using the cmd line tool: F:\sqlite>sqlite3 SQLite version 3.5.9 Enter ".help" for instructions sqlite> create

Re: [sqlite] Replacing a table

2009-10-15 Thread Gerry Snyder
Pavel Ivanov wrote: > > > To update column in all rows of the table you need to issue the > following statement: > > UPDATE table_name SET column_name = value > And note that the "value" above does not have to be a constant. It can, for instance, depend on other values in the row being

Re: [sqlite] dump in-memory db to file in tcl

2009-10-03 Thread Gerry Snyder
Ned Fleming wrote: > Is it possible to dump an in-memory sqlite database (or table?) to a > file from within Tcl? > > I create it like so: > > sqlite3 dbFireData :memory: > > and insert a bunch of records, and then commit. Is there reason not to attach a file (old or new), and either

Re: [sqlite] Problems encountered on upgrade from SQLite2 to -3

2009-09-02 Thread Gerry Snyder
Rod Dav4is wrote: > Thanks for reminding me: A thing's value is generally proportional to > its cost. And the attitude of its support team figures in there, too. > -R. There is only one person with attitude I see here, and it is not Dr. Hipp and it is not P. Kishor. I have never seen a

Re: [sqlite] Integer Storage class

2009-09-02 Thread Gerry Snyder
Beau Wilkinson wrote: >> i chose Integer for Performance isues... i'm develop. an POS Software >> and our articles table has lot's of >records. i need to optimize >> search. an Integer (1,2,4,6,8 bytes) is faster that 13-bytes-ean text >> for >comparison. >> > > That's

  1   2   3   >