Re: [sqlite] Query optimisation

2018-08-24 Thread David Wellman
Hi Richard and David, Many thanks for your responses, very useful. I'll work with that (being careful to look at the OpCode documentation for my release of sqlite!) and see where I get to. Cheers, Dave Ward Analytics Ltd - information in motion Tel: +44 (0) 118 9740191 Fax: +44 (0) 118

[sqlite] Query optimisation

2018-08-24 Thread David Wellman
HI all, I would like to use the following example as a learning exercise for myself to check my understanding of part of sqlite processing. I have the following query which functionally works fine, and to be upfront about it the volume of data is so small that performance is not an issue.

[sqlite] Data types for date and time functions

2017-09-25 Thread David Wellman
Hi, We're designing a new feature which will involve a lot of date/time calculations which we intend to do within the SQLite engine. As far as we can tell it has the functions that we need. Basically we'll be loading data into SQLite and performing analysis and calculations using SQL. The

Re: [sqlite] [EXTERNAL] Number of rows in answer set

2017-09-18 Thread David Wellman
[mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Richard Hipp Sent: 18 September 2017 10:03 To: SQLite mailing list Subject: Re: [sqlite] [EXTERNAL] Number of rows in answer set On 9/18/17, David Wellman <dwell...@ward-analytics.com> wrote: > sqlite3_step - this one runs the sq

Re: [sqlite] [EXTERNAL] Number of rows in answer set

2017-09-18 Thread David Wellman
ave been returned. -Ursprüngliche Nachricht- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von David Wellman Gesendet: Montag, 18. September 2017 10:27 An: 'SQLite mailing list' <sqlite-users@mailinglists.sqlite.org> Betreff: [EXTERNAL] [sqlite]

[sqlite] Number of rows in answer set

2017-09-18 Thread David Wellman
Hi, If I run a SELECT statement that returns an answer set is there an api call that will tell me "number of rows in answer set" - something like "sqlite3_row_count"? I have looked at the calls but couldn't find any - sorry if I've missed it. I know could use a "create temporary table xxx as

[sqlite] Download documentation for 3.20.1 still shows as Draft

2017-09-16 Thread David Wellman
Hi, If you download the 3.20.1 documentation zip file from http://www.sqlite.org/download.html the pages still show as 'Draft' (in big red letters). Not a major issue but it is a bit disconcerting when you first see it. Cheers, Dave Ward Analytics Ltd - information in motion Tel: +44 (0)

[sqlite] Check understanding of Prepare and Step processing

2017-09-16 Thread David Wellman
Hi, I'm just trying to check my understanding of what happens when running a query against SQLite and particularly how that might affect interaction between an application and SQLite. The SQL itself isn't really important for now, but assume it's a select statement which will return some

Re: [sqlite] Syntax error using CTE and UPDATE

2017-09-04 Thread David Wellman
Now that could be really useful for some things that I'm doing. Many thanks. Dave Ward Analytics Ltd - information in motion Tel: +44 (0) 118 9740191 Fax: +44 (0) 118 9740192 www: http://www.ward-analytics.com Registered office address: The Oriel, Sydenham Road, Guildford, Surrey, United

Re: [sqlite] Syntax error using CTE and UPDATE

2017-09-04 Thread David Wellman
= relation.queryid AND dtls.udb_key = relation.udb_key AND dtls.tablename = relation.tablename LIMIT 1 ) ; Hope that works, Cheers! Ryan On 2017/09/04 12:23 PM, David Wellman wrote: > Hi, > > > > (I have a feeling that this will be depressingly simple - b

Re: [sqlite] Syntax error using CTE and UPDATE

2017-09-04 Thread David Wellman
- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of David Wellman Sent: 04 September 2017 11:23 To: 'SQLite mailing list' Subject: [sqlite] Syntax error using CTE and UPDATE Hi, (I have a feeling that this will be depressingly simple - but I just can't see

[sqlite] Syntax error using CTE and UPDATE

2017-09-04 Thread David Wellman
Hi, (I have a feeling that this will be depressingly simple - but I just can't see it right now.) The following code is failing with: Error: near line 3: no such column: dtls.mapname2 explain with dtls as (select distinct wrk.mapname as mapname2 ,udb.udb_key

Re: [sqlite] Do you really need an ORDER BY after a GROUP BY

2017-08-24 Thread David Wellman
I always work on the premise that "if I want data returned to my application in a specific order then code an ORDER BY clause" If the dbms 'happens to' return data in the desired order then that is obviously good, but if that behaviour is not documented (and I don't know about SQLite) then

Re: [sqlite] Version 3.20.0 release candidate 2

2017-07-25 Thread David Wellman
, Surrey, United Kingdom, GU1 3SR Registered company number: 3917021 Registered in England and Wales. -Original Message- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of David Wellman Sent: 25 July 2017 16:46 To: 'SQLite mailing list' Subject: Re

Re: [sqlite] Version 3.20.0 release candidate 2

2017-07-25 Thread David Wellman
om Registered office address: The Oriel, Sydenham Road, Guildford, Surrey, United Kingdom, GU1 3SR Registered company number: 3917021 Registered in England and Wales. -Original Message- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of David Well

Re: [sqlite] Version 3.20.0 release candidate 2

2017-07-25 Thread David Wellman
Hi, Minor doc error at https://sqlite.org/draft/bindptr.html The first paragraph under "2. A Brief History Of Pointer Passing In SQLite" starts with: It is sometimes convenient for SQLite extensions to communicatin non-SQL values... I'm not sure what it is meant to say, but probably not

Re: [sqlite] Sequential numbers

2014-06-25 Thread David Wellman
HI, That sounds a neat solution, I'll have a look at implementing one. Many thanks. Dave Ward Analytics Ltd - information in motion Tel: +44 (0) 118 9740191 Fax: +44 (0) 118 9740192 www: http://www.ward-analytics.com Registered office address: The Oriel, Sydenham Road, Guildford, Surrey, United

Re: [sqlite] Combining two databases into one

2013-11-11 Thread David Wellman
Hi Simon, Thanks for that. Can I just check something. When you say " Don't forget to DELETE FROM before you insert your new rows " I assume that you're saying to make sure that the target table is empty before I do the insert. Yes? Cheers, Dave Ward Analytics Ltd - information in motion Tel:

Re: [sqlite] Some basic questions

2013-04-24 Thread David Wellman
Database Subject: Re: [sqlite] Some basic questions On 23 Apr 2013, at 7:57pm, David Wellman <david.well...@ward-analytics.com> wrote: > Q1) Is it possible to execute sql commands asynchronously ? i.e. my > program issues the sql command and then 'loops' whilst waiting for the > co

[sqlite] Some basic questions

2013-04-24 Thread David Wellman
Hi, I've just started using SQLite and having come from another dbms environment I'm trying to find out if some of the features that I'm used to using in my coding are available with Sqlite. I've done a lot of searching through the documentation and I apologise if the information is there but