Re: [sqlite] New SQLite Forum established - this mailing list is deprecated

2020-03-13 Thread Tim Streater
On 13 Mar 2020, at 09:35, Peter da Silva wrote: > What do you mean there have been "just a few threads" in the mailing list? > I can barely keep up with it. As a lurker I can say that this mailing list suits just fine. Another forum means another username/password I have to manage. On a list,

Re: [sqlite] Please unsubscribe me

2020-01-30 Thread Tim Streater
On 30 Jan 2020, at 15:34, kuppappa wrote: > Regards, > Kuppappa > Mobile: +91 8050095558 > ___ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users You do that

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

2020-01-27 Thread Tim Streater
On 27 Jan 2020, at 22:18, 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. "Serverless" seemed like the natural term to use, as it > seems to mean "without a server". > >

Re: [sqlite] Unexplained table bloat

2020-01-12 Thread Tim Streater
On 12 Jan 2020, at 22:25, Tom Browder wrote: > On Sun, Jan 12, 2020 at 14:05 Keith Medcalf wrote: > >> On Sunday, 12 January, 2020 09:03, Tom Browder >> wrote: >> >Am I missing something? I thought every column has to have a type? >> >> Close, but no banana. Every value has a type. A column

Re: [sqlite] Unexplained table bloat

2020-01-10 Thread Tim Streater
On 10 Jan 2020, at 18:55, Keith Medcalf wrote: > On Friday, 10 January, 2020 11:44, Tim Streater wrote: > >>On 10 Jan 2020, at 18:03, Richard Hipp wrote: > >>> On 1/10/20, Dominique Devienne wrote: >>>> There's no way at all, to know the length of a

Re: [sqlite] Unexplained table bloat

2020-01-10 Thread Tim Streater
On 10 Jan 2020, at 18:03, Richard Hipp wrote: > On 1/10/20, Dominique Devienne wrote: >> >> There's no way at all, to know the length of a text column with embedded >> NULLs? >> > > You can find the true length of a string in bytes from C-code using > the sqlite3_column_bytes() interface. But

Re: [sqlite] TO

2020-01-08 Thread Tim Streater
On 08 Jan 2020, at 16:13, R Smith wrote: > Hopefully the last of the silly questions... > > The word "TO" is given as an SQLite Keyword, but I cannot find any > reference to it being used anywhere in the SQL used by SQLite. > > The search doesn't help (because the word TO is everywhere in

Re: [sqlite] Questions about your "Performance Matters" talk re SQLite

2020-01-03 Thread Tim Streater
On 03 Jan 2020, at 22:08, sky5walk wrote: > Querying the config state is helpful for a dll wrapped database, ... What's one of them? -- Cheers -- Tim ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Bug: Table contains two records for the same primary key in .dump output but not in SELECT output

2019-12-21 Thread Tim Streater
On 21 Dec 2019, at 21:42, Michael Walker (barrucadu) wrote: > I'm not sure the attachment to my first email got through ... Correct. The list strips them. -- Cheers -- Tim ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Result set column names

2019-12-10 Thread Tim Streater
On 10 Dec 2019, at 21:42, Simon Slavin wrote: > On 10 Dec 2019, at 9:35pm, Doug wrote: > >> For column "xxx" what will the full column name be? "foo.xxx"? > > For column "xxx" in table "foo", yes. > > However, that's only if you've used "PRAGMA full_column_names". And that > PRAGMA is now

Re: [sqlite] Crash Bug Report

2019-12-08 Thread Tim Streater
On 08 Dec 2019, at 21:55, Simon Slavin wrote: > On 8 Dec 2019, at 7:51pm, Yongheng Chen wrote: > >> The bug exists in "SQLite version 3.31.0 2019-12-08 00:06:39” and before. > > SQLite version 3.28.0 2019-04-15 14:49:49 > Enter ".help" for usage hints. > Connected to a transient in-memory

[sqlite] Result set column names

2019-12-07 Thread Tim Streater
At various times in various threads on this list it has been stated that the column name in a result set is not guaranteed unless one uses AS. IOW, one should say select abc as abc from mytable where i=23; rather than just: select abc from mytable where i=23; I'm trying to find where on

Re: [sqlite] Can SQLite import Latin1 data?

2019-11-15 Thread Tim Streater
On 15 Nov 2019, at 20:13, Winfried wrote: > I have a big CSV file that's encoded in Latin1 (cp1252), while SQLite stores > strings as Unicode. > > Neither Google nor ".help" helped to find if SQLite offers a switch to > convert Latin1 to UTF-8 on the fly before running the ".import" command. > >

Re: [sqlite] rationale for private archives of the SQLite mailing list and suppressed reply-to

2019-10-11 Thread Tim Streater
On 11 Oct 2019, at 16:56, Brannon King wrote: > I agree that Mailman is archaic. I worry about the security on it. I don't > enjoy using 3rd-party mirrors for searching it. I'd like to propose that we > upgrade to something more modern and secure like Sympa or mlmmj, or even a > more drastic

Re: [sqlite] Date time input

2019-10-07 Thread Tim Streater
On 07 Oct 2019, at 17:19, Keith Medcalf wrote: > On Monday, 7 October, 2019 07:17, Jose Isaias Cabrera > wrote: > >>I have to ask this question: Why is it that the date function does not >>take a '4/5/2019' and returns '2019-04-05'? > > Because it does not. Humans read things in big endian

Re: [sqlite] Programming methodology (was DEF CON (wasL A license plate of NULL))

2019-08-15 Thread Tim Streater
On 15 Aug 2019, at 18:13, James K. Lowden wrote: > On Tue, 13 Aug 2019 16:47:43 -0400 > Richard Hipp wrote: > >> On 8/13/19, Jose Isaias Cabrera wrote: >> > >> > I see all of you smart programmers using this >> > non-column matching behavior, and I ask myself why? >> >> Because that's the way

Re: [sqlite] Best way to create multiple tables?

2019-08-14 Thread Tim Streater
On 12 Aug 2019, at 13:51, dboland9 wrote: > I'm doing an app. that has multiple tables in sqlite. When the app. is run > for the first time, or the tables are lost/damaged, it will create the > database and all tables. My question is if there is a best way to create 5 > tables? > > I can put

Re: [sqlite] Backward compatibility vs. new features (was: Re: dates, times and R)

2019-08-12 Thread Tim Streater
On 12 Aug 2019, at 14:30, J Decker wrote: > On Mon, Aug 12, 2019 at 5:42 AM Simon Slavin wrote: > >> On 12 Aug 2019, at 1:27pm, Tim Streater wrote: >> >> > I don't expect to do that with SQL. My "seconds since the epoch" is >> based on conver

Re: [sqlite] Backward compatibility vs. new features (was: Re: dates, times and R)

2019-08-12 Thread Tim Streater
On 12 Aug 2019, at 12:41, Thomas Kurz wrote: > The problem is not only about storing an arbitrary integer or float number. A > date is much more, it has timezone information with it, and I would like to > see a DATE column handle this in a proper and well-defined way, just as a > calendar

Re: [sqlite] Backward compatibility vs. new features (was: Re: dates, times and R)

2019-08-12 Thread Tim Streater
On 12 Aug 2019, at 00:43, Keith Medcalf wrote: > On Sunday, 11 August, 2019 16:02, Richard Damon > wrote: > >>On 8/11/19 4:21 PM, Thomas Kurz wrote: > I do understand the value of having date/time types in SQLite, but it is not easy to do while retaining backward compatibility. > >

Re: [sqlite] round function inconsistent

2019-05-25 Thread Tim Streater
On 24 May 2019, at 13:35, Jose Isaias Cabrera wrote: > Alessandro Merolli, on Friday, May 24, 2019 07:39 AM, wrote... > >> Great! Now use SQLite API and add a new user defined function for >> your used case. >> I suppose that SQlite should always follow a well-defined pattern: in >> this case as

Re: [sqlite] unsubscribe

2019-05-13 Thread Tim Streater
On 13 May 2019, at 09:19, Christof Arnosti wrote: > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users Do that yourself at the link above. -- Cheers -- Tim ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Please remove my email address from the list

2019-05-05 Thread Tim Streater
On 05 May 2019, at 10:14, Michaël Doukan wrote: > Thanks > ___ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users You have to do that yourself using the link in

Re: [sqlite] Problem with REAL PRIMARY KEY

2019-05-04 Thread Tim Streater
On 04 May 2019, at 18:49, Richard Hipp wrote: > On 5/4/19, Manuel Rigger wrote: >> Consider the following example: >> >> CREATE TABLE t1 (c0, c1 REAL, PRIMARY KEY (c1, c0)); >> INSERT INTO t1(c1) VALUES (0X7ff);; >> SELECT ALL * FROM t1 WHERE c1 = 5.76460752303423e+17; >> >> I

Re: [sqlite] Getting the week of the month from strftime or date functions

2019-05-04 Thread Tim Streater
On 04 May 2019, at 09:35, Olivier Mascia wrote: >> Le 2 mai 2019 à 22:01, Thomas Kurz a écrit : >> >> I think "week of the month" is not a standard value. As with week of the >> year, is week #1 the week in which the month starts, the first complete week >> within the month, or the first week

Re: [sqlite] Database corruption check.

2019-04-15 Thread Tim Streater
On 15 Apr 2019, at 11:02, Simon Slavin wrote: > On 15 Apr 2019, at 10:36am, Lullaby Dayal wrote: > >> Thank you very much for your response. The link seems to be helpful. But I >> fail to run the .selftest command from my sqlite3 prompt. I got the error: >> unknown command or invalid arguments

Re: [sqlite] Why no persistent user settings in a database file?

2019-04-03 Thread Tim Streater
On 03 Apr 2019, at 11:52, Tom Browder wrote: > After coming back to SQLite from a long absence, I was surprised that > setting things like .mode and .headers in a database didn't stay that way > after exiting the file. > > Then I remembered something about a resource file and found .sqliterc on

Re: [sqlite] What is the most commonly used file extension for sqlite3 database files?

2019-03-23 Thread Tim Streater
On 23 Mar 2019, at 16:06, Peng Yu wrote: > I see a variety of extensions for sqlite3 database files, such as .db, > .db3, .sqlite3 and .sq3. Is there a most commonly used/accepted > convention for the extension? Thanks. I use none at all. No extension is actually needed. -- Cheers -- Tim

Re: [sqlite] INSERTing from another table data

2019-03-20 Thread Tim Streater
On 20 Mar 2019, at 00:35, Simon Davies wrote: > On Tue, 19 Mar 2019 at 15:07, Tim Streater wrote: >> >> My use case is a mixture of these. My need is to copy a row from a table in >> one db (db1) to a table with identical schema in another db (db2). The >> complica

Re: [sqlite] INSERTing from another table data

2019-03-19 Thread Tim Streater
On 19 Mar 2019, at 13:46, R Smith wrote: > Three ways in SQL to create and fill a table with data from another: > > 1. CREATE ... AS > Example: > CREATE TABLE newTable AS SELECT a,b,c FROM oldTable; > 2. CREATE TABLE + INSERT > Example: > CREATE TABLE newTable(a INT, b REAL, c TEXT); > INSERT

Re: [sqlite] Maximum result set size

2019-03-11 Thread Tim Streater
On 11 Mar 2019, at 20:21, Simon Slavin wrote: > On 11 Mar 2019, at 7:30pm, Tim Streater wrote: > >> What is the maximum size in bytes that a result set may be? And what happens >> if that size were to be exceeded? > > [The following is simplified for clarity. I

[sqlite] Maximum result set size

2019-03-11 Thread Tim Streater
What is the maximum size in bytes that a result set may be? And what happens if that size were to be exceeded? -- Cheers -- Tim ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Disk I/O errors

2019-02-23 Thread Tim Streater
On 23 Feb 2019, at 19:30, Simon Slavin wrote: > On 23 Feb 2019, at 6:41pm, Tim Streater wrote: > >> The PHP interface to SQLite doesn't appear to give me access to the extended >> codes, unfortunately. > > I used to do SQLite from PHP myself. Hold on ... &g

Re: [sqlite] Disk I/O errors

2019-02-23 Thread Tim Streater
On 23 Feb 2019, at 18:10, Simon Slavin wrote: > On 23 Feb 2019, at 5:55pm, Tim Streater wrote: > >> I have a hosted web site using the SQLite functions from PHP. The page where >> PHP is used was failing, and on investigation this is because an SQLite >> function calle

[sqlite] Disk I/O errors

2019-02-23 Thread Tim Streater
(sorry for the duplicate - vibrating finger). I have a hosted web site using the SQLite functions from PHP. The page where PHP is used was failing, and on investigation this is because an SQLite function called from within PHP is now returning: Code: 10 (SQLITE_IOERR) Msg: disk I/O error I

[sqlite] Disk I/O errors

2019-02-23 Thread Tim Streater
I have a hosted web site using the SQLite functions from PHP. The page where PHP is used was failing, and on investigation this -- Cheers -- Tim ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Am I understanding how to use ROLLBACK - SAVEPOINT correctly?

2019-02-13 Thread Tim Streater
On 13 Feb 2019, at 15:23, David Raymond wrote: > On a humor tangent, am I the only person who has ever named a savepoint > "theHounds" for the sole purpose of being able to run the statement: > > release theHounds; welease Bwian; -- Cheers -- Tim

Re: [sqlite] My TimeStamp field keeps populating though I don't write anything to it

2019-02-05 Thread Tim Streater
On 05 Feb 2019, at 13:08, Scott wrote: > I have a Comment table with the fields: CommentID, Summary, Comment, Pages, > TimeStamp, Hyperlink. The TimeStamp field is setup as a Time(8), time with 8 > characters only. Not every comment in this table requires a timestamp, so it > should remain null.

Re: [sqlite] Min/Max and skip-scan optimizations

2019-02-02 Thread Tim Streater
On 02 Feb 2019, at 22:19, Gerlando Falauto wrote: > What I'm now trying to do is filter on source1 and by range of timestamp. > Results should be naturally ordered by source1, source2,ts. Not unless you use an ORDER BY. -- Cheers -- Tim ___

Re: [sqlite] SQLite error (5): database is locked

2019-01-14 Thread Tim Streater
On 14 Jan 2019, at 18:54, Simon Slavin wrote: > SQLite's own busy_timeout routine (the one you get if you don't supply your > own) uses exponential backoff. It first sleeps for a very small amount of > time, then checks the lock. If access is still prevented it sleeps longer, > then checks

Re: [sqlite] Session extension, "INSERT OR REPLACE" and "WITHOUT ROWID"

2019-01-06 Thread Tim Streater
On 06 Jan 2019, at 13:11, Daniel Kraft wrote: > Since it seems that the mailing list swallowed my attached example code, > I've put it on Github as well: Attachments are explicitly disallowed on this list. -- Cheers -- Tim ___ sqlite-users

Re: [sqlite] Question about floating point

2018-12-17 Thread Tim Streater
On 17 Dec 2018, at 21:50, Thomas Kurz wrote: > Can someone explain to me why it has been defined this way? Having 1 bit sign, > 11 bit exponent, and 52 bit mantissa, I would have stored the (in the meantime > well known) number 211496.26 as 21149626E-2, i.e. I would have stored a 52 bit >

Re: [sqlite] Question about floating point

2018-12-17 Thread Tim Streater
On 17 Dec 2018, at 04:32, D Burgess wrote: >> Banks still use, as they have for a very long time, Binary Coded >> Decimal, or some equivalent that does not suffer from a loss of >> accuracy, so all this foofaraw to do with floating point representation >> of various amounts of currency does not

Re: [sqlite] unsubscribe

2018-10-23 Thread Tim Streater
On 22 Oct 2018, at 20:08, thomgrayr...@printeasy.net wrote: > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users Go to that web site, which is shown in every mail you have received from this list. -- Cheers -- Tim ___

Re: [sqlite] SQLITE_OPEN_READONLY in PHP

2018-10-20 Thread Tim Streater
On 20 Oct 2018, at 17:05, "p...@geniais.com" wrote: > I'm using a C compiled program to write exclusively to a database, and a php > script for reading only (that communicates via socket). > I know I can use sqlite3_open_v2() with SQLITE_OPEN_READONLY in C, but there > is a way to open a

Re: [sqlite] A couple of questions about prepared statements

2018-10-19 Thread Tim Streater
On 19 Oct 2018, at 17:33, Simon Slavin wrote: > On 19 Oct 2018, at 3:43pm, Tim Streater wrote: > >> is it OK to generate the myid and goodtext parts using the usual string >> methods from my host language, leaving only badtext as a bound variable, so >> that my prepa

[sqlite] A couple of questions about prepared statements

2018-10-19 Thread Tim Streater
Suppose I have an SQL statement like this: select somecol from mytable where myid=3 and badtext="usertext" and goodtext="somegoodtext" Suppose further that the values of myid and goodtext are generated by reliably me whereas badtext is supplied externally. If I want to use a prepared

Re: [sqlite] SQLite mailing list [was: SQLite Windows GUI alternative to Excel?]

2018-10-10 Thread Tim Streater
On 10 Oct 2018, at 18:10, Warren Young wrote: > On Oct 10, 2018, at 10:39 AM, Eric wrote: >> >> * mailing lists come to me, I don't have to go and get them > > So do Fossil email alerts. So there's an unecessary email I've just received telling me to go to the forum. I hate emails like that.

Re: [sqlite] SQLite Windows GUI alternative to Excel?

2018-10-07 Thread Tim Streater
On 07 Oct 2018, at 00:18, Warren Young wrote: > On Oct 6, 2018, at 2:21 PM, Simon Slavin wrote: >> >> Excel ate the financial business world because companies use Excel to solve >> a simple problem, then add a feature, then add another feature, and keep >> going until they have some crawling

Re: [sqlite] SQLite Windows GUI alternative to Excel?

2018-10-06 Thread Tim Streater
On 06 Oct 2018, at 17:23, Warren Young wrote: > I guess neither of you read the article, because the point of the original > question isn’t to get recommendations for yet another spreadsheet program, > it’s to get a program that lets us get away from spreadsheets-as-databases, > because when

Re: [sqlite] --disable-threadsafe broken in 3.25.x

2018-10-01 Thread Tim Streater
On 01 Oct 2018, at 21:02, Fabrice Fontaine wrote: > Please find attached a patch fixing this issue. As this is my first > contibution to sqlite, please excuse me if I made any mistakes. Don't send attachment (not allowed), include it inline. -- Cheers -- Tim

Re: [sqlite] Some queries with ORDER BY and LIMIT lock DB

2018-09-07 Thread Tim Streater
On 07 Sep 2018, at 20:20, Richard Hipp wrote: > On 9/7/18, Firecore wrote: >> >> It's easily reproduced with the sqlite3 client and db file available here >> (https://www.dropbox.com/s/l1xofadq7vi5vjj/lock_issue.db?dl=0): > > I cannot reproduce it. It always runs instantly for me. I also ran

Re: [sqlite] Blob and Text columns: what's the difference?

2018-08-28 Thread Tim Streater
On 28 Aug 2018, at 15:36, Keith Medcalf wrote: > On Tuesday, 28 August, 2018 07:50, Tim Streater wrote: >>How does it know not to do that if I want to send some binary data to a Text >>column? > > Simply because you do not request that those things be done. > > So,

[sqlite] Blob and Text columns: what's the difference?

2018-08-28 Thread Tim Streater
What is actually the difference between a column declared as TEXT and one declared as BLOB in an SQLite database? What does SQLite do to textual data that I ask it to put into a TEXT column? How does it know not to do that if I want to send some binary data to a Text column? The reason I'm

Re: [sqlite] Invalid Blob Length Error Message

2018-08-17 Thread Tim Streater
On 17 Aug 2018, at 01:24, Casey Rodarmor wrote: > I wrote an erroneous update statement: > > ``` > UPDATE foo SET bar = x'01234'; > ``` > > The error message was: > > ``` > unrecognized token: "x'01234' > ``` > > I know now that the problem was that the blob's length was not a > multiple of two.

Re: [sqlite] No unicode characters in sqlite3 console prg

2018-08-11 Thread Tim Streater
On 11 Aug 2018, at 17:51, Lars Frederiksen wrote: > Is this an error of my windows 10 cmd prompt or is it a general problem that > the sqlite3 console is not able to show unicode in the cmd-window.?? > > No problem writing to the database and show (greek) unicode characters in > the cmd prompt

Re: [sqlite] Add Column with "If Not Exists"

2018-08-01 Thread Tim Streater
On 01 Aug 2018, at 21:06, Warren Young wrote: > On Aug 1, 2018, at 1:52 PM, Tim Streater wrote: >> >> I don't use the pragma since, officially, they are unsupported. > > “Unsupported” how? It’s documented and part of the SQLite file header, which > is quite

Re: [sqlite] Add Column with "If Not Exists"

2018-08-01 Thread Tim Streater
On 01 Aug 2018, at 20:40, Warren Young wrote: > On Aug 1, 2018, at 7:34 AM, Simon White > wrote: >> >> I would like to suggest the addition of the "If not exists" to the Add >> Column feature of SQLite. > > I maintain an application that’s been through dozens of schema changes over > its

Re: [sqlite] Add Column with "If Not Exists"

2018-08-01 Thread Tim Streater
On 01 Aug 2018, at 14:34, Simon White wrote: > I would like to suggest the addition of the "If not exists" to the Add > Column feature of SQLite.  There are quite common situations where > ensuring a column exists is important so that an update to remote > devices will not fail but it is not

Re: [sqlite] column types and constraints

2018-06-29 Thread Tim Streater
On 29 Jun 2018, at 17:46, Bob Friesenhahn wrote: > On Fri, 29 Jun 2018, danap wrote: >> >> Unless your trying to create a generic user interface. >> >> I have spent the last month trying to solve affinity with the columns. >> The only way it seems to me to guarantee to solve the issue is to test

Re: [sqlite] Shouldn't have to specify primary key explicitly

2018-06-28 Thread Tim Streater
On 28 Jun 2018, at 12:48, Scott Robertson wrote: > SQLite is supposed to autoincrement by default when a column is defined > as "INTEGER PRIMARY KEY" according to everything I've read. But I've > only gotten this to work if I let SQLite create its own PK column. If I > have an explicit PK

Re: [sqlite] Mailing list shutting down...

2018-06-13 Thread Tim Streater
On 13 Jun 2018, at 12:22, Richard Hipp wrote: > Unfortunately, I'm going to need to shut down this mailing list due to > robot harassment. I am working to come up with a fix or an > alternative now. Your suggestions are welcomed. Perhaps another subscription mechanism is needed, if that is

Re: [sqlite] Insert with an '

2018-06-11 Thread Tim Streater
On 11 Jun 2018, at 09:07, Peter Nacken wrote: > I try to insert email addresses into a table and get an error with addresses > they have a single quotation mark ( na'm...@domain.ltd ). > > Sorry I'm facing this problem for weeks, I can't find a solution. > > Is there a known workaround for it ?

Re: [sqlite] How to download SQLite for Mac?

2018-06-07 Thread Tim Streater
On 06 Jun 2018, at 17:06, Sabrina Abdul Jalil wrote: > I am on MAC OS Sierra VER 10.12.06. How to download SQLite? It's already installed on your computer. -- Cheers -- Tim ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Function to use to convert a text float to a float for use in ORDER BY

2018-05-18 Thread Tim Streater
On 17 May 2018, at 23:13, Keith Medcalf wrote: > select col1, col2 from mytable order by cast(body_size as float); Thank you. That's much better (although abs(body_size) worked too). -- Cheers -- Tim ___ sqlite-users mailing

[sqlite] Function to use to convert a text float to a float for use in ORDER BY

2018-05-17 Thread Tim Streater
My db has a table with a column defined thus: body_size text default '0.0' whose purpose is to hold the size of the item that the row represents. All rows contain a value but as a string to one decimal place, not a number. So the column contains strings such as '0.0', '3.7', '22.9', etc. All

Re: [sqlite] Multi threaded readers on memory sqlite cannot scale

2018-05-13 Thread Tim Streater
On 13 May 2018, at 17:01, Dennis Clarke wrote: > On 05/13/2018 11:57 AM, Kevin O'Gorman wrote: > Also is that a single socket machine with a single big memory bank or > is it NUMA and multiple sockets or is it just a single motherboard unit? And I'd be curious to know

Re: [sqlite] memory leak?

2018-04-12 Thread Tim Streater
On 12 Apr 2018, at 21:34, Simon Slavin wrote: > On 12 Apr 2018, at 8:00pm, Warren Young wrote: > >> Also: http://valgrind.org/docs/manual/faq.html#faq.pronounce > > I didn't know that. So they want it to be pronounced like 'lint'. > Interesting. That

Re: [sqlite] How to convert a datetime column to a date?

2018-03-22 Thread Tim Streater
On 22 Mar 2018, at 14:05, Ron Watkins wrote: > The file that I use ".import" on contains records like this: > '2018-03-22 07:01:01'|2533268 > I had assumed the value was being treated as a datetime, but it looks like it > may be treated as a string? > > Im a bit confused

Re: [sqlite] How to optimise a somewhat-recursive query?

2018-03-18 Thread Tim Streater
On 18 Mar 2018, at 21:48, Jonathan Moules wrote: > CREATE TABLE lookups ( > url_id INTEGER REFERENCES urls (url_id), > retrieval_datetime DATETIME, > error_code INTEGER, > is_generic_flag BOOLEAN -- about one in

Re: [sqlite] UTF8 and NUL

2018-01-26 Thread Tim Streater
On 26 Jan 2018, at 18:12, Keith Medcalf wrote: > Actually, EOF (0xFF) *is* part of a text file, and is the byte in an ASCII > byte-stream that indicates end-of-file. First I've heard of that. Which systems did that then? EOF is normally indicated by the file system, not by

Re: [sqlite] SQLite version 3.22.0

2018-01-22 Thread Tim Streater
On 22 Jan 2018, at 21:21, Nnaemeka R Egudu wrote: > Please unsubscribe me from this mailing list. > Thanks. Do it yourself using this URL: > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users -- Cheers -- Tim

Re: [sqlite] Changed behaviour or bug using field alias in 3.21.0

2017-12-22 Thread Tim Streater
On 22 Dec 2017, at 09:57, Hick Gunter wrote: > The problem lies in your reliance on unspecified behaviour. Unspecified > behaviour is allowed to change. > > I am sure you have read (and ignored) the following guarantee taken from > http://sqlite.org/c3ref/column_name.html : My

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

2017-11-23 Thread Tim Streater
On 22 Nov 2017, at 19:49, "Niall O'Reilly" wrote: > On 21 Nov 2017, at 16:27, Drago, William @ CSG - NARDA-MITEQ wrote: > >> Please, not a forum. The email list is instant, dynamic, and convenient. I >> don't think checking into a forum to stay current with the brisk

Re: [sqlite] Best way to develop a GUI front-end

2017-11-13 Thread Tim Streater
On 13 Nov 2017, at 21:54, Balaji Ramanathan wrote: > Is there a third party free tool like MS Access that would allow me to > connect to a SQLite db in the back-end and enable me to create a custom > front-end to it with forms and reports? All my searches for

Re: [sqlite] SQLite DB - DateTime field values are not consistent

2017-11-02 Thread Tim Streater
On 02 Nov 2017, at 12:23, Rajat Pal wrote: > In SQLite database, All the values of datetime fields are saved as text > without any format check. We can save any text value in the datetime column. > This behavior is creating problem for us because for different regional >

Re: [sqlite] Possible bug with strftime('%s') < strftime('%s')

2017-10-11 Thread Tim Streater
On 11 Oct 2017, at 18:53, R Smith wrote: > Yes. When you concatenate/add a string and integer together some SQL > engines will try to give a sensible result, so that '5' + 3 will yield 8 > because 3 is INT and it reckons that '5' probably meant 5 since it is > added to

Re: [sqlite] My 1st C++ SQLite3 program

2017-08-27 Thread Tim Streater
On 27 Aug 2017, at 15:35, Papa wrote: > First and foremost, I'd like to thank everybody for your replies. > Although I have sound knowledge and understanding of C++ [ that can be > debatable ] and still remember a little how C works, I have no Idea how > to utilize the API of

Re: [sqlite] What is the exact syntax for SELECT MAX in PHP?

2017-08-05 Thread Tim Streater
On 5 Aug 2017, at 9:35, Edmondo Borasio wrote: > $results = $db->query("SELECT MAX(ID) FROM Table")->fetchArray(); > $Highest_ID = $results['ID']; > var_dump($Highest_ID); > > I get NULL Try: $results = $db->query("SELECT MAX(ID) as mx FROM

Re: [sqlite] UPDATE database using parameters

2017-07-21 Thread Tim Streater
On 21 Jul 2017, at 11:14, Rowan Worth <row...@dug.com> wrote: > On 21 July 2017 at 17:50, Tim Streater <t...@clothears.org.uk> wrote: > >>$sql = "UPDATE Movies SET name = '$newname' where id=$newid"; >> >> Personally I don't like forcing PHP to s

Re: [sqlite] UPDATE database using parameters

2017-07-21 Thread Tim Streater
On 21 Jul 2017 at 10:04, Edmondo Borasio wrote: > Hi Tim. > > It *almost* works.. > >$DbItemNameTest = "new name"; >$hIdTest = "1"; > >$db->exec ('UPDATE Anagrafica SET name = \'' . $DbItemNameTest . > '\' WHERE hospital_ID="1"'); //IT WORKS >

Re: [sqlite] UPDATE database using parameters

2017-07-21 Thread Tim Streater
On 21 Jul 2017 at 09:58, Simon Slavin wrote: > On 21 Jul 2017, at 7:33am, Edmondo Borasio wrote: > >> $db->exec('UPDATE Movies SET name = "new movie" WHERE ID="4"'); > > Those are the wrong quotes. SQLite requires single quotes around literal >

Re: [sqlite] UPDATE database using parameters

2017-07-21 Thread Tim Streater
On 21 Jul 2017 at 07:33, Edmondo Borasio wrote: > I am updating a record of a SQLite database as follows: > > $db->exec('UPDATE Movies SET name = "new movie" WHERE ID="4"'); > > but instead of using name and ID I want to use some variables, $NewItemName > and $hId. > >

Re: [sqlite] UTF8-BOM and text encoding detection (was: UTF8-BOM not disregarded in CSV import)

2017-06-29 Thread Tim Streater
On 29 Jun 2017 at 08:01, Eric Grange wrote: >> The sender, however, could be lying, and this needs to be considered > > This is an orthogonal problem: if the sender is sending you data that is > not what it should be, then he could just as well be sending you > well-encoded

Re: [sqlite] UTF8-BOM and text encoding detection (was: UTF8-BOM not disregarded in CSV import)

2017-06-28 Thread Tim Streater
On 28 Jun 2017 at 14:20, Rowan Worth wrote: > On 27 June 2017 at 18:42, Eric Grange wrote: > >> So while in theory all the scenarios you describe are interesting, in >> practice seeing an utf-8 BOM provides an extremely >> high likeliness that a file will

Re: [sqlite] Error message on insert

2017-06-19 Thread Tim Streater
On 19 Jun 2017, at 12:2, Keith Medcalf wrote: > insert into filters (absid, filter_name, enabled, filter_order) > values (null, 'Untitled filter', 0, coalesce((select max(filter_order) from > filters)+1,1)) > > If you want the filter_order by filter_name then you would

[sqlite] Error message on insert

2017-06-19 Thread Tim Streater
I want to insert a new row in my table, and while doing so setting a column to one more than the maximum value of that column, thus: insert into filters (absid, filter_name, enabled, filter_order) values (null, 'Untitled filter', 0, max(filter_order)+1) However I get "Error: no such column:

Re: [sqlite] SQLite DB on external USB HD - is it safe?

2017-05-12 Thread Tim Streater
On 11 May 2017, at 23:35, Simon Slavin wrote: > It’s the word 'remote' which is not clearly explained. In the SQLite > documentation, the word 'remote' means you’re accessing it using a networking > API not a file system API. It’s the network storage APIs which tend to do

Re: [sqlite] SQLite log - automatic index on sqlite_sq_25FA456860(ID) (284)

2017-05-03 Thread Tim Streater
On 3 May 2017, at 18:16, Olivier Mascia wrote: > Would there be a cheap way for SQLite to log some more user-realm context > about these? > Maybe simply emitting a second call to the log function right after these > messages code 284 where the third parameter (msg) would simply

Re: [sqlite] Is it possible to create the Stored Procedure (SP) in Sqlite?

2017-04-16 Thread Tim Streater
On 15 Apr 2017 at 22:17, Simon Slavin wrote: > On 15 Apr 2017, at 9:14pm, petern wrote: > >> Yes, please include it in the FAQ > > It’s not a FAQ. Not on this list, at least. I would argue against it. Well he meant on the sqlite website.

Re: [sqlite] Testing sqlite db to see if exists & ready

2017-04-06 Thread Tim Streater
On 06 Apr 2017 at 19:54, Jens Alfke wrote: > PS: Tim, for some reason your mail client (iLetter) is sending replies without > an In-Reply-To header, which breaks up the threading (at least in my mail > client) making it very hard to follow. There’s probably not a way for you

Re: [sqlite] Testing sqlite db to see if exists & ready

2017-04-06 Thread Tim Streater
On 06 Apr 2017 at 16:10, Simon Slavin <slav...@bigfraud.org> wrote: > On 6 Apr 2017, at 4:04pm, Tim Streater <t...@clothears.org.uk> wrote: > >> On 06 Apr 2017 at 15:33, Simon Slavin <slav...@bigfraud.org> wrote: >> >>> After touching, try openin

Re: [sqlite] Testing sqlite db to see if exists & ready

2017-04-06 Thread Tim Streater
On 06 Apr 2017 at 15:33, Simon Slavin <slav...@bigfraud.org> wrote: > On 6 Apr 2017, at 2:44pm, Tim Streater <t...@clothears.org.uk> wrote: > >> That would appear not to be the case. Under OS X 10.9.5, I touched a >> non-existent file and then using

Re: [sqlite] Testing sqlite db to see if exists & ready

2017-04-06 Thread Tim Streater
On 06 Apr 2017 at 13:19, Simon Slavin <slav...@bigfraud.org> wrote: > On 6 Apr 2017, at 12:11pm, Tim Streater <t...@clothears.org.uk> wrote: > >> When my app starts, I check that the file in question actually *is* a >> database by doing some simple steps like open,

Re: [sqlite] Testing sqlite db to see if exists & ready

2017-04-06 Thread Tim Streater
On 06 Apr 2017 at 11:28, Clemens Ladisch wrote: > dave boland wrote: >> Being a little paranoid, I like to insure that the db file exists > > SQLite automatically creates an empty DB if you try to open > a nonexistent file, so you do not actually need to do anything. > >>

Re: [sqlite] Why isn't my time formatting working?

2017-03-08 Thread Tim Streater
On 08 Mar 2017 at 20:40, Paul Sanderson wrote: > The vast majority of dates I see in SQLite databases are unix epoch integer > times (seconds since 1/1/1980) with unix milli seconds a close second. > Efficient to store, sort and do date arithmetic on but need to be

Re: [sqlite] Thread safety of serialized mode

2017-02-16 Thread Tim Streater
On 16 Feb 2017 at 18:30, James K. Lowden wrote: > On Tue, 14 Feb 2017 17:05:30 -0800 > Darren Duncan wrote: > >> There is nothing inherently wrong with threads in principle > > What's inherently wrong with threads in principle is that there is

Re: [sqlite] Datatype for prices (1,500)

2016-11-30 Thread Tim Streater
On 30 Nov 2016 at 14:42, Werner Kleiner wrote: > Hello, > there is a small application which uses MYSQL db and can also switch to sqlite > In MySQL a table "prices" has a column "basicprice" which is decimal(7,4) > I can store a price in form 1.500 there. > Same table

Re: [sqlite] converting unix10 and unix13 dates in the same column

2016-09-29 Thread Tim Streater
On 29 Sep 2016 at 14:14, Paul Sanderson wrote: > I have a table with dates in different formats, either 10 digit or 13 > digit unix dates > > 1234345087123 > 1234567890 > 1432101234 > 1456754323012 Are these strings or numbers? What is your SQL to get these into

Re: [sqlite] "Responsive" website revamp at www.sqlite.org

2016-09-06 Thread Tim Streater
On 06 Sep 2016 at 11:02, Eric Grange wrote: > Well, I guess I am in the minority using a tabbed browser then :) > > In tabbed browsers, all browser tabs share the same window width, and it is > quite impractical to resize the browser every time you switch a tab. Yes, I do the

  1   2   3   >