Re: [sqlite] [EXTERNAL] Re: Patch: VTable Column Affinity Question and Change Request

2020-02-06 Thread Nelson, Erik - 2
Hick Gunter wrote on Thursday, February 6, 2020 3:32 AM >We are almost exclusively using virtual tables to allow queries against our >internal data sources, >which are C language structs and thus strictly typed. The column affinities >provided by the VTab >implementations are used for

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

2020-01-06 Thread Nelson, Erik - 2
Keith Medcalf Sent Saturday, January 04, 2020 3:29 PM >So I conclude that SERIALIZED/MULTITHREAD makes very little difference >and that MEMSTATUS ON/OFF makes a huge difference. Since the That's a potentially very useful observation! Is any of this available to JDBC users? Erik

Re: [sqlite] Performance vs. memory trade-off question

2019-12-16 Thread Nelson, Erik - 2
Dominique Devienne wrote on Monday, December 16, 2019 7:46 AM >On Sat, Dec 14, 2019 at 2:27 PM Richard Hipp wrote: >> QUESTION: Should this feature be default-on or default-off? >> >> What's more important to you? 0.25% fewer CPU cycles or about 72KB >> less heap space used per database

Re: [sqlite] Safe saving of in-memory db to disk file

2019-07-15 Thread Nelson, Erik - 2
Dominique Devienne wrote on Monday, July 15, 2019 2:41 AM >That's when you reach for virtual tables (and their "virtual indices"). >I.e. you keep your data in native data-structures (Boost.MultiIndex in my >case), >and just provide a SQLite view of it. Much faster than "pure-in-Memory" with >

Re: [sqlite] Bug in table_info pragma

2019-05-17 Thread Nelson, Erik - 2
Please disregard, apologies for the noise. From: "Nelson, Erik - 2" Sent: May 17, 2019 8:17 AM To: sqlite-users@mailinglists.sqlite.org Subject: [External email from sqlite-users-boun...@mailinglists.sqlite.org] Re: [sqlite] Bug in table_info pragm

Re: [sqlite] Bug in table_info pragma

2019-05-17 Thread Nelson, Erik - 2
We need to get these into the hive database, if that's helpful From: Simon Slavin Sent: May 17, 2019 8:16 AM To: SQLite mailing list Subject: Re: [sqlite] Bug in table_info pragma On 17 May 2019, at 12:06pm, J. King wrote: > Then there would be no

Re: [sqlite] SETting a value to a field with multiple conditions

2019-05-15 Thread Nelson, Erik - 2
I maintained an in-house sqlite patch that did this for a number of years... just made the buffer a little bigger, printed something like " set tt.<==HERE" It was quite useful for helping application users self-serve their own query problems. -Original Message- From: sqlite-users

Re: [sqlite] Retrieve tables accessed by query

2019-02-12 Thread Nelson, Erik - 2
ry key, field1, field4); CREATE TABLE tbl2 (rowid integer primary key, field3, field2); sqlite> -Original Message- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Nelson, Erik - 2 Sent: Tuesday, February 12, 2019 2:29 PM To: SQLite mailing list

Re: [sqlite] Retrieve tables accessed by query

2019-02-12 Thread Nelson, Erik - 2
hinking of something else here) -Original Message- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Nelson, Erik - 2 Sent: Tuesday, February 12, 2019 1:00 PM To: SQLite mailing list Subject: Re: [sqlite] Retrieve tables accessed by query Clemens Ladisch Sent

Re: [sqlite] Retrieve tables accessed by query

2019-02-12 Thread Nelson, Erik - 2
Clemens Ladisch Sent: Tuesday, February 12, 2019 12:38 PM >Zach Wasserman wrote: >> Is anyone aware of an API I can use to determine which tables are accessed >> by a given query? Both Clemens and Warren had good comments. I'm curious if there's a way to do it in a database where the tables

[sqlite] sqlite as 'streaming mode' query engine?

2018-01-25 Thread Nelson, Erik - 2
Sqlite aggregation functions receive one call for each row in the underlying results set. Has anyone on the list done a virtual table that's a based on a stream? Something conceptually along the lines of Insert row a Insert row b begin aggregation on rows a, b insert row c insert row d update

Re: [sqlite] Is it possible to conditionally insert a record?

2018-01-10 Thread Nelson, Erik - 2
Can you use something along the lines of this? insert into max_value select value as "value" from source_table order by value desc limit 1; Shane Dev Sent: Wednesday, January 10, 2018 11:49 AM To: SQLite mailing list Subject: [sqlite] Is it possible to

Re: [sqlite] C++ compiler

2018-01-02 Thread Nelson, Erik - 2
Eli Sent: Saturday, December 30, 2017 6:36 AM >It would be awesome if SQLite could compile as a part of bigger C++ project. >Right now there is a bunch of pointer casting errors, that can be fixed in >a matter of hour IMHO. I don't have any trouble using it as part of a larger C++ project.

[sqlite] Committing and memory usage

2017-12-28 Thread Nelson, Erik - 2
Does committing reduce memory usage on a memory database with pragma journal_mode=off? I see advice to do periodic commits in order to reduce memory usage, but I'm wondering if that also applies to memory databases with journaling off.

Re: [sqlite] Move to Github!!?

2017-12-27 Thread Nelson, Erik - 2
Fredrik Gustafsson Sent: Wednesday, December 27, 2017 8:52 AM >Ask yourself if you want a system that is easy to use or easy to learn. That feels like a false choice- why can't it be both easy to learn and easy to use? That's a hallmark of good engineering. >Also when you're forced to use a

[sqlite] journal mode and transactions

2017-12-22 Thread Nelson, Erik - 2
The transactions documentation (https://sqlite.org/lang_transaction.html) states >If PRAGMA journal_mode is set to OFF (thus disabling the rollback journal file) then the behavior of the ROLLBACK command is undefined. Does that correspondingly mean there's no performance benefit to wrapping

[sqlite] generic advice for insert performance in-memory database optimization

2017-12-21 Thread Nelson, Erik - 2
I've got an in-memory database with a single table that I need to fill with ~500 million rows. There are no indexes and the table definitions is create table data(id int, path int, month int, val1 double, val2 double, val3 double... val20 double) I'm running on linux with the OS page size

Re: [sqlite] Kind of function out of common table expression

2017-12-20 Thread Nelson, Erik - 2
Yannick Duchêne Sent: Wednesday, December 20, 2017 5:23 PM >I wonder is there is a way with SQLite3, to reuse a often used and >moderately long common table expression without the need to copy/paste it in >every query text it is used in. I use a C preprocessor for this and pass the queries

Re: [sqlite] reate index implies analyze?

2017-12-20 Thread Nelson, Erik - 2
Great explanation, thanks -Original Message- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Hick Gunter Sent: Wednesday, December 20, 2017 10:41 AM To: 'SQLite mailing list' Subject: Re: [sqlite] [EXTERNAL]

Re: [sqlite] [EXTERNAL] performance impact of index creation order

2017-12-20 Thread Nelson, Erik - 2
this would not be a first order performance issue in any event. I was just curious if anyone had insight into the relative merits of varying the index creation order. -Ursprüngliche Nachricht- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von

[sqlite] performance impact of index creation order

2017-12-20 Thread Nelson, Erik - 2
Assuming that table 'data' is completely constructed, does index creation order have any performance ramifications? For example, would it be reasonable to assume that the order of these two statements has no performance impact? (all fields are integer in this case) create unique index

[sqlite] create index implies analyze?

2017-12-20 Thread Nelson, Erik - 2
If I am finished making inserts into a table, does the act of creating an index also populate the index? That is, do I need to separately run 'analyze'? My impression was that there was no need to call analyze unless rows had been inserted after index creation.

Re: [sqlite] Odd question

2017-12-19 Thread Nelson, Erik - 2
Mark Sent: Tuesday, December 19, 2017 1:32 AM On Mon Dec 18, 2017 at 04:48:27PM +, Nelson, Erik - 2 wrote: > Nomad Sent: Sunday, December 17, 2017 4:11 PM > >On Sat Dec 16, 2017 at 07:53:22PM +0000, Nelson, Erik - 2 wrote: > > >> Select 1 as value from (insert into

Re: [sqlite] Odd question

2017-12-18 Thread Nelson, Erik - 2
Keith Medcalf Sent: Monday, December 18, 2017 2:31 PM ...snipped a lot... >>Right, all of the statements are step'd regardless of the result of >>sqlite3_column_count(). SQLITE_DONE is returned from the first >>step() for insert queries. >>In pseudocode, it's >>prepare("insert...") //okay

Re: [sqlite] Odd question

2017-12-18 Thread Nelson, Erik - 2
Keith Medcalf Sent: Monday, December 18, 2017 1:07 PM To: SQLite mailing list Subject: Re: [sqlite] Odd question >>I investigated a further while exploring some of the list >>suggestions. The app halts with an error unless >>sqlite3_column_count() > 0.

Re: [sqlite] Odd question

2017-12-18 Thread Nelson, Erik - 2
Kees Nuyt Sent: Monday, December 18, 2017 12:51 PM On Sat, 16 Dec 2017 21:43:44 +, "Nelson, Erik - 2" <erik.l.nel...@bankofamerica.com> wrote: >> I'm using an application that I can't change. >> I can give it multiple queries to run but the >> a

Re: [sqlite] Odd question

2017-12-18 Thread Nelson, Erik - 2
Keith Medcalf Sent: Sunday, December 17, 2017 4:30 PM >How do you know the insert is not working? Have you verified that the data is >not being inserted or are you simply relying on a popup provided by the >application? If the later, you should be aware that the application can >pop-up

Re: [sqlite] Odd question

2017-12-18 Thread Nelson, Erik - 2
Peter Da Silva Sent: Monday, December 18, 2017 12:24 PM >What I don’t understand is this app that’s making SQLite calls, so it’s using >the SQLite library, and it’s expecting a result from updates and inserts? Yes, exactly. The app designers assumed that rows are returned from every

Re: [sqlite] Odd question

2017-12-18 Thread Nelson, Erik - 2
Nomad Sent: Sunday, December 17, 2017 4:11 PM >On Sat Dec 16, 2017 at 07:53:22PM +0000, Nelson, Erik - 2 wrote: >> For unfortunate reasons, I need a query that does an insert and also >> returns at least one row... for example, something along the lines of >> Select 1

Re: [sqlite] Odd question

2017-12-18 Thread Nelson, Erik - 2
Nelson, Erik - 2 Sent: Saturday, December 16, 2017 5:27 PM >Petern wrote on Saturday, December 16, 2017 4:53 PM >>Re: Nelson "odd". This will make the desired (?) side effect happen: >>.load eval.so >>SELECT coalesce(eval('INSERT INTO table1 VALUES(a, b,

Re: [sqlite] Odd question

2017-12-16 Thread Nelson, Erik - 2
Simon Slavin wrote on Saturday, December 16, 2017 5:15 PM >>On 16 Dec 2017, at 9:43pm, Nelson, Erik - 2 <erik.l.nel...@bankofamerica.com> >>wrote: >> I'm using an application that I can't change. I can give it multiple >> queries to run but the application assume

Re: [sqlite] Odd question

2017-12-16 Thread Nelson, Erik - 2
Petern wrote on Saturday, December 16, 2017 4:53 PM Re: Nelson "odd". This will make the desired (?) side effect happen: >.load eval.so >SELECT coalesce(eval('INSERT INTO table1 VALUES(a, b, c)'), 1) AS value; >If INSERT references columns from an outer scope then use printf() inside the

Re: [sqlite] Odd question

2017-12-16 Thread Nelson, Erik - 2
org] On Behalf Of Nelson, Erik - 2 >Sent: Saturday, 16 December, 2017 12:53 >To: SQLite mailing list >Subject: [sqlite] Odd question > >For unfortunate reasons, I need a query that does an insert and also >returns at least one row... for example, something along the lines of >

[sqlite] Odd question

2017-12-16 Thread Nelson, Erik - 2
For unfortunate reasons, I need a query that does an insert and also returns at least one row... for example, something along the lines of Select 1 as value from (insert into table1 values(a, b, c)) Or Select coalesce((insert into table1 values(a, b, c)), 1) as value I've tried a number of

Re: [sqlite] Need SQLite datafiles to be locked on OS level(Windows)

2017-11-27 Thread Nelson, Erik - 2
Simon Slavin wrote on Monday, November 27, 2017 12:39 PM > Subject: Re: [sqlite] Need SQLite datafiles to be locked on OS level(Windows) > > On 27 Nov 2017, at 4:51pm, Joe Mistachkin wrote: > > > Judging from the description so far, I think that both SQLite and > >

Re: [sqlite] Need SQLite datafiles to be locked on OS level (Windows)

2017-11-24 Thread Nelson, Erik - 2
Jirí Matejka Sent on Friday, November 24, 2017 3:45 AM >but this does not prevent reading and modifying the file from other >processes while they are open by SQLite in our process. Does antivirus or Windows randomly modify other applications' files? It seems like no program could reliably

[sqlite] SQLITE_DETERMINISTIC sticky in sqlite3_create_function?

2017-09-12 Thread Nelson, Erik - 2
If I'm redefining a user-defined function as SQLITE_DETERMINISTIC before each query, will the function still get called for subsequent queries? For example, if I had void user_func(sqlite3_context *context, int argc, sqlite3_value **argv){ return random() } sqlite3_create_function(db,

[sqlite] extension to query/set environment variables?

2017-07-14 Thread Nelson, Erik - 2
Hello, I could imagine a virtual table that held all the environment variables, or a user-defined function to get or set environment variables. Does anyone know of anything in the wild along these lines? I know how I would implement it, wanted to see if someone else already had. Erik

Re: [sqlite] sqlite3_create_function xFinal argument called when there's an error?

2017-05-17 Thread Nelson, Erik - 2
error? > > Nelson, Erik - 2 wrote: > > for aggregate functions, is xFinal called if there's an error? > > Yes; it's always called when SQLite cleans up the context. > > >Clemens wrote: Thanks! In that case, should any result be set in xFinal? Like sqlite3_result_e

[sqlite] sqlite3_create_function xFinal argument called when there's an error?

2017-05-16 Thread Nelson, Erik - 2
All- for aggregate functions, is xFinal called if there's an error? For example, in the percentile.c add-on function, percentStep has code like sqlite3_result_error(pCtx, "2nd argument to percentile() is not " "a number between 0.0 and 100.0", -1); If that error

Re: [sqlite] sqlite3 feature or regression

2017-03-10 Thread Nelson, Erik - 2
Thanks for taking the time to send in the report and thanks to all who investigated it. The robust discussion demonstrates the passion of the sqlite community, and I enjoy thinking about the various points as they are made. From: [Vermes Mátyás

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

2016-09-06 Thread Nelson, Erik - 2
Richard Hipp wrote on Tuesday, September 06, 2016 7:26 AM >There is nothing on the Download page that is useful to a mobile device. >So links to that page are omitted on mobile, to save precious pixels. What percentage of sqlite.org hits are mobile browsers? I agree there's nothing of use to a

[sqlite] error messages from SQLite

2016-03-20 Thread Nelson, Erik - 2
I've seen a small patch along the lines of this used. I'm sure it could be improved, but it seems like it often would give a bit more context. Token msg; msg.z = pParse->zTail; msg.n = pParse->sLastToken.z - pParse->zTail + pParse->sLastToken.n; if(msg.n > 36) { msg.z = msg.z +

[sqlite] Problem with accumulating decimal values

2015-12-11 Thread Nelson, Erik - 2
Frank Millman Friday, December 11, 2015 9:21 AM > > I am having a problem accumulating decimal values. > > sqlite> UPDATE fmtemp SET balance = balance + 123.45; SELECT bal FROM > sqlite> fmtemp; > 6049.049 > > Can anyone explain what is going on, and is there a way to avoid it? >

[sqlite] "Shipping a New Mindset" - SQLite in Windows 10

2015-11-10 Thread Nelson, Erik - 2
Richard Hipp Sent: Tuesday, November 10, 2015 2:41 PM > > http://engineering.microsoft.com/2015/10/29/sqlite-in-windows-10/ Congratulations! -- This message, and any attachments, is for the intended recipient(s) only, may

[sqlite] field name in UDF

2015-11-09 Thread Nelson, Erik - 2
Stephan Beal Sent: Saturday, November 07, 2015 3:54 AM > On Fri, Nov 6, 2015 at 6:50 PM, Nelson, Erik - 2 < > erik.l.nelson at bankofamerica.com> wrote: > > > I have a user-defined function something like > > > > void quarter_sqlite3(sqlite3_context *context, int

[sqlite] field name in UDF

2015-11-06 Thread Nelson, Erik - 2
Stephan Beal wrote on Friday, November 06, 2015 1:00 PM > On Fri, Nov 6, 2015 at 6:50 PM, Nelson, Erik - 2 wrote: > > > I have a user-defined function something like > > > > void quarter_sqlite3(sqlite3_context *context, int argc, > sqlite3_value > > **argv); >

[sqlite] field name in UDF

2015-11-06 Thread Nelson, Erik - 2
I have a user-defined function something like void quarter_sqlite3(sqlite3_context *context, int argc, sqlite3_value **argv); for each sqlite3_value being passed in, it would sometimes be helpful to have the associated field (if any) that the value is associated with. Is there any way to

[sqlite] accessing database from Lua and C

2015-10-26 Thread Nelson, Erik - 2
Simon Slavin wrote on Sunday, October 25, 2015 6:59 AM > On 25 Oct 2015, at 10:05am, Lev wrote: > > > Untill now my architecture does all the SQLite work in C, and pass > > simple variables on Lua's stack. > > > > Today morning I've got an idea to push only the database connection > object. > >

[sqlite] UPDATE silently failing

2015-09-23 Thread Nelson, Erik - 2
Hugues Bruant wrote on Wednesday, September 23, 2015 2:06 AM > > > in some cases the SIndex captured inside the first lambda (UPDATE > > > statement) appeared to be null even though it wasn't null in the > > > enclosing scope (setVersion_) > > > > Interesting (and disturbing) result. Is this with

[sqlite] UPDATE silently failing

2015-09-22 Thread Nelson, Erik - 2
R.Smith wrote on Tuesday, September 22, 2015 10:08 AM > > On 2015-09-22 03:58 PM, Hugues Bruant wrote: > > SIndex sidx is just a boxed immutable integer. Its value is bound to > > the UPDATE and the trace shows it to be 0 But the log line printed > > when the number of rows updated is zero

[sqlite] Feedback request: JSON support in SQLite

2015-09-11 Thread Nelson, Erik - 2
Richard Hipp wrote on Friday, September 11, 2015 11:59 AM > > Draft documentation for the current design of JSON support in SQLite > can be seen on-line at > > https://www.sqlite.org/draft/json1.html This looks really good! With the understanding that json_extract() already has the

[sqlite] Lua inside SQLite

2015-08-26 Thread Nelson, Erik - 2
Abilio Marques wrote on Sunday, August 23, 2015 4:42 PM > > 3. Lua can return arrays. Also, Lua can return multiple values. Tried > to take advantage of those facts, but while reading the SQLite API > documentation, found no function where I could map multiple values as > the return of a

[sqlite] Determine query type

2015-08-06 Thread Nelson, Erik - 2
> users-bounces at mailinglists.sqlite.org] On Behalf Of Scott Hess wrote on > Thursday, August 06, 2015 1:11 PM > > Also consider https://www.sqlite.org/c3ref/stmt_readonly.html > > On Thu, Aug 6, 2015 at 10:08 AM, Stephan Beal > wrote: > > > On Thu, Aug 6, 2015 at 6:57 PM, Ben Newberg >

[sqlite] User-defined types -- in Andl

2015-06-08 Thread Nelson, Erik - 2
david at andl.org wrote on Monday, June 08, 2015 9:23 AM > > Ultimately, I don't think it will really matter, because the role of > Andl is to be platform independent. Do you care what your SQL product > is written in? > Absolutely. I wouldn't be using SQLite if it wasn't C/C++, and I suspect

[sqlite] Getting a crash on 32-bit Linux

2015-04-14 Thread Nelson, Erik - 2
Ron Aaron wrote on Tuesday, April 14, 2015 1:51 PM >Something is very wrong, then. The file I downloaded from the sqlite.org >site, and unzipped, has these: >-rw-r--r--@ 1 ron staff 5507061 Apr 8 17:38 sqlite3.c Can you confirm that this file came from the .zip file, not the .gz file? >>

Re: [sqlite] Shell tool improvement request

2015-01-16 Thread Nelson, Erik - 2
RSmith wrote on Friday, January 16, 2015 1:08 PM > > On 2015/01/16 18:33, Simon Slavin wrote: > > > > Error: mytextfile.txt line 13588392: expected 2 columns of data but > > found 1 > > > > Naturally I spent some time looking near the end of the file to > figure out what was wrong where the

Re: [sqlite] sqlite3_bind_text and strings that look like numbers

2015-01-06 Thread Nelson, Erik - 2
Simon Slavin wrote on Tuesday, January 06, 2015 3:00 PM > > On 6 Jan 2015, at 7:49pm, Nelson, Erik - 2 > <erik.l.nel...@bankofamerica.com> wrote: > > > Is there any way to force the bind_text() to store the input text > verbatim? > > Another possibility is tha

Re: [sqlite] sqlite3_bind_text and strings that look like numbers

2015-01-06 Thread Nelson, Erik - 2
Richard Hipp wrote Tuesday, January 06, 2015 3:04 PM > On 1/6/15, Nelson, Erik - 2 <erik.l.nel...@bankofamerica.com> wrote: > > > > converts the value to a textual scientific notation representation, > > like > > Nope. SQLite is not doing this. Something else is

[sqlite] sqlite3_bind_text and strings that look like numbers

2015-01-06 Thread Nelson, Erik - 2
This is part of a larger application, but what I *think* is happening is using a table definition like create table tester(id text collate nocase) and a prepared statement like insert into tester values(?) then calling bind something like this pseudocode sqlite3_bind_text(stmt, column,

Re: [sqlite] VACUUM requires 6.7 times space ?

2015-01-05 Thread Nelson, Erik - 2
Simon Slavin wrote on Monday, January 05, 2015 10:40 AM > > On 5 Jan 2015, at 2:43pm, Nelson, Erik - 2 > <erik.l.nel...@bankofamerica.com> wrote: > > > RSmith wrote on Monday, January 05, 2015 7:43 AM > > > >> I haven't done this, but I seem to remember th

Re: [sqlite] VACUUM requires 6.7 times space ?

2015-01-05 Thread Nelson, Erik - 2
RSmith wrote on Monday, January 05, 2015 7:43 AM > > On 2015/01/05 13:32, Dan Kennedy wrote: > > On 01/05/2015 06:22 PM, Simon Slavin wrote: > >> I have a database file which is 120GB in size. It consists of two > huge tables and an index. //... > > Probably running out of space wherever temp

Re: [sqlite] Whish List for 2015

2014-12-23 Thread Nelson, Erik - 2
Tony Papadimitriou wrote on Tuesday, December 23, 2014 10:48 AM > > Can you explain a bit more? > > * Who is 'we'? Is this an open source project somewhere? > * How is the combined Lua & SQLite3 executable created? Do you have > some makefile (for Windows and Linux) or some instructions for

Re: [sqlite] Whish List for 2015

2014-12-23 Thread Nelson, Erik - 2
Tony Papadimitriou Sent on Tuesday, December 23, 2014 10:26 AM >Problem 1: Currently, any scripts have to be stored outside the database > in separate files meaning there one-file-holds-everything deal is lost > (and organizing these according to the database they refer also becomes > a bit of an

Re: [sqlite] Counting rows

2014-12-11 Thread Nelson, Erik - 2
Simon Slavin wrote on Thursday, December 11, 2014 10:19 AM > I know that the internal structure of a table means that this number > isn't simple to produce. But is there really no faster way ? This > table is going to have about six times that amount soon. I really > can't count the rows in

Re: [sqlite] Serializing an object's vector or array using sqlite3 in c++

2014-11-21 Thread Nelson, Erik - 2
RSmith wrote on Friday, November 21, 2014 4:46 AM > > On 2014/11/21 08:09, Thane Michael wrote: > > Many of the answers I came across online implied that it wouldn't be > > as straightforward as serializing ints and strings. > > Of course a byte-stream serializer is most speed-and-size happy and

Re: [sqlite] query REAL without trailing decimal and zero?

2014-09-15 Thread Nelson, Erik - 2
Richard Hipp wrote on Monday, September 15, 2014 3:16 PM > On Mon, Sep 15, 2014 at 3:02 PM, Nelson, Erik - 2 < > erik.l.nel...@bankofamerica.com> wrote: > > > When I query a field defined with type 'real', I get '.0' appended to > > the results for whole numbers

[sqlite] query REAL without trailing decimal and zero?

2014-09-15 Thread Nelson, Erik - 2
When I query a field defined with type 'real', I get '.0' appended to the results for whole numbers. For example if the value in the field is 1, it appears as 1.0 in the query results. Is there some way for me to change this? I poked around in the code and it appeared that the format string

Re: [sqlite] Request to change int parameter to size_t parameter / potential bug on iOS (64 bit)

2014-09-08 Thread Nelson, Erik - 2
> Roger Binns wrote on Sunday, September 07, 2014 2:30 PM > On 07/09/14 11:19, Richard Hipp wrote: > > Please use a cast to silence the compiler warnings. > "(int)sizeof(...)" > > instead of just "sizeof(...)". > > That isn't safe for correctly written 64 bit apps. For example they > could end

Re: [sqlite] Cannot retrieve SQLite Db Data Immediately After Application Startup

2014-09-05 Thread Nelson, Erik - 2
Bob Moran wrote on: Friday, September 05, 2014 12:07 AM > On Wed, Sep 3, 2014 at 1:29 PM, Nelson, Erik - 2 < > erik.l.nel...@bankofamerica.com> wrote: > > > Bob Moran wrote on Wednesday, September 03, 2014 12:45 PM > > > > > > One added note: My GUI is using

Re: [sqlite] Problems uploading CSV into sqlite3 DB

2014-09-04 Thread Nelson, Erik - 2
Carlos A. Gorricho (HGSAS) wrote on Friday, September 05, 2014 4:17 AM >So, any ideas on how to solve this issue will be more than welcome. I have >tried several shortcuts...none works. >Latest was to install an Ubuntu 14.04 Virtual Machine on my Mac, via Parallels >software. > Maybe line

Re: [sqlite] Cannot retrieve SQLite Db Data Immediately After Application Startup

2014-09-03 Thread Nelson, Erik - 2
Bob Moran wrote on Wednesday, September 03, 2014 12:45 PM > > One added note: My GUI is using QT4, where in this case the SQL text > goes something like: > > QString qstr = "select id, step, temp from protocols where id > = %1"; > qstr = qstr.arg(id); > char * str =

Re: [sqlite] Window functions?

2014-08-25 Thread Nelson, Erik - 2
Stephan Beal wrote on Monday, August 25, 2014 3:26 PM > > For the small percentage of users who need it (or would even know how > to apply it). i've been following this list since 2006 or 2007 and i > recall this topic having come up only a small handful of times, which > implies that only a

Re: [sqlite] Importing ~1000 CSV files faster

2014-08-19 Thread Nelson, Erik - 2
Joe Fisher wrote on Tuesday, August 19, 2014 5:11 PM > I use the temp table because every CSV files has a header with the > column names. Can you just import the files, header row and all, into your destination table and just delete the 2000 header rows at the end?

Re: [sqlite] Vacuum command fails

2014-07-18 Thread Nelson, Erik - 2
veeresh kumar wrote: > Now I am running the the application on D: Drive (it has 841 GB free > space) and C: drive has space (333 GB free). It looks like VACUUM uses > C:drive space ??? Also command seems to be working fine... > Maybe I'm missing something, but I felt like this was pretty

Re: [sqlite] Vacuum command fails

2014-07-17 Thread Nelson, Erik - 2
Luuk wrote: >so, 0 means temp is written to disk. >Back to the the question. >How much free disk space is there? >I think you need more than 14Gb of free space if your database is 14Gb in size. >http://lmgtfy.com/?q=sqlite+vacuum+how+much+disk+space+is+needed=1 >"This means that when

Re: [sqlite] Is 32bit SQLite limited to 1900mb RAM in windows?

2014-06-30 Thread Nelson, Erik - 2
Simon Slavin wrote on Monday, June 30, 2014 12:21 PM > > SQLite isn't a thing, it's an API. There's no SQLite server. There's > no particular installation of SQLite on a computer that Windows expects > to be in a particular place. You can have many copies of many > different versions of SQLite

Re: [sqlite] detect database/table/field use

2014-06-26 Thread Nelson, Erik - 2
Roger Binns wrote on Thursday, June 26, 2014 5:38 PM > >On 26/06/14 12:58, Nelson, Erik - 2 wrote: > > I'd like to record which databases/tables/fields are accessed. Is > > there any not-too-difficult way of doing this? > > The authorizer interface will address your iss

[sqlite] detect database/table/field use

2014-06-26 Thread Nelson, Erik - 2
I work with a C++ application that embeds the SQLite source and executes user-supplied queries against SQLite database(s). I'd like to record which databases/tables/fields are accessed. Is there any not-too-difficult way of doing this? Poking around in the source, it seems like a fundamental

[sqlite] Google Stuff

2014-04-09 Thread Nelson, Erik - 2
I'm not sure where to file this, but it seems like a problem... if I google SQLite, like https://www.google.com/search?q=sqlite The SQLite Home Page comes up at the top of the results. The URL shown is an HTTPS one, like https://sqlite.org which doesn't work (at least not for me, at my

[sqlite] More context on parse error

2014-04-08 Thread Nelson, Erik - 2
I've mentioned before on the list that a bit more context in parse error messages would be helpful in our application. I hacked something quick that seems to work for us, posting it in case anyone else finds it useful or would like to improve on it.

Re: [sqlite] Send Mail from sqlite

2014-02-07 Thread Nelson, Erik - 2
Simon Slavin wrote on Friday, February 07, 2014 5:06 AM >> On 7 Feb 2014, at 9:59am, Vairamuthu wrote: >> Thanks for your response, it will be great help if you can get me >> some sample code or algorithms, on that. > > That would depend on what programming language you

Re: [sqlite] locked database?

2013-12-13 Thread Nelson, Erik - 2
Richard Hipp wrote: > The first thing I would do is use the sqlite3_next_stmt() interface ( > http://www.sqlite.org/c3ref/next_stmt.html) to double-check that there > were no unreset and unfinalized prepared statements. > That's perfect, exactly what I needed to find the offending statement!

[sqlite] locked database?

2013-12-13 Thread Nelson, Erik - 2
In my app that embeds sqlite version 3.7.14, I'm running into a database locking problem that happens when detaching a database. If I execute attach database 'file:dbtest.db?mode=ro' as prism the attachment happens okay, but when I execute detach database prism I get the error 'database

[sqlite] getting more context on SQL parse errors

2013-10-08 Thread Nelson, Erik - 2
When a SQL parsing error happens, the message returned by sqlite3_errmsg() is pretty terse... is there some way to retrieve more context, so that the user has more than one token to help locate the problem? For example, having the previous several tokens that were successfully parsed would

Re: [sqlite] attaching databases programmatically

2013-07-22 Thread Nelson, Erik - 2
Marc L. Allen wrote on Monday, July 22, 2013 10:55 AM > > I see. Sorry about that! > > I guess the real problem is the in-memory ones. The other ones must > have a database file associated with them, right? > Probably, but that doesn't mean that the file is accessible through a filename

Re: [sqlite] attaching databases programmatically

2013-07-22 Thread Nelson, Erik - 2
Richard Hipp wrote on Monday, July 22, 2013 10:28 AM > > On Mon, Jul 22, 2013 at 10:19 AM, Nelson, Erik wrote: > > > I've got an application that allows the user to create an arbitrary > > number of databases, either in memory or not. In my C++ program, I > > have the handles and I'd like to

[sqlite] attaching databases programmatically

2013-07-22 Thread Nelson, Erik - 2
I've got an application that allows the user to create an arbitrary number of databases, either in memory or not. In my C++ program, I have the handles and I'd like to attach them all together so the user can execute queries against them. However, the only way that I've found to do that is to

Re: [sqlite] attaching databases programmatically

2013-07-22 Thread Nelson, Erik - 2
Marc L. Allen wrote on Monday, July 22, 2013 10:47 AM > Nelson, Erik wrote: > > I've got an application that allows the user to create an arbitrary > > number of databases, either in memory or not. In my C++ program, I > > have the handles and I'd like to attach them all together so the user > >