Re: [sqlite] more efficient JSON encoding: idle musing

2020-02-21 Thread Martin Raiber
On 21.02.2020 15:03 Richard Hipp wrote: > On 2/21/20, Wout Mertens wrote: >> The idea is that upon storing the JSON >> data, the JSON1 extension parses it, extracts the layouts recursively, >> stores them when they are not known yet, and then only stores the >> values in the binary format with

Re: [sqlite] Online backup of in memory database

2019-10-06 Thread Martin Raiber
On 06.10.2019 22:02 Keith Medcalf wrote: > On Sunday, 6 October, 2019 13:03, Kadirk wrote: > >> We already have an application specific WAL file, sqlite updates + >> application data is in this WAL file. We are taking snapshot of sqlite + >> application data to the disk to truncate WAL file, then

[sqlite] CLI .parameter command observations/request

2019-08-16 Thread Martin
erwise, thanks to the development team for a tool that just gets better! Regards, Martin. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] specify CHECK clause to date text field

2019-08-14 Thread Martin
d date into a text field. Thanks, Martin. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Correct use of sqlite3_vtab_nochange/sqlite3_value_nochange

2019-08-13 Thread Kevin Martin
> On 13 Aug 2019, at 14:08, Richard Hipp wrote: > > I think that is correct. > Great, thanks. > But it never occurred to me that somebody might do this on the PRIMARY > KEY. I don't see any reason why it wouldn't work, though. I have a c++ interface built on top of the virtual table api

Re: [sqlite] [EXTERNAL] Correct use of sqlite3_vtab_nochange/sqlite3_value_nochange

2019-08-13 Thread Kevin Martin
> On 12 Aug 2019, at 07:53, Hick Gunter wrote: > > You did not state your argc and argv[0] values, Apologies, it is a 2 column table. Full details are: - argc is 4 - argv[0] is the value of the primary key for the row I want to update. - argv[1] is SQLITE_NULL, but as described,

[sqlite] Correct use of sqlite3_vtab_nochange/sqlite3_value_nochange

2019-08-10 Thread Kevin Martin
Hi, I have a without rowid virtual table with an implementation of xColumn that begins with if(sqlite3_vtab_nochange(ctx)) return SQLITE_OK; If I try to perform an update on this table that doesn't involve a primary key change, then my understanding from the documentation is that xUpdate will

[sqlite] Optimising multiple group by clauses

2019-06-09 Thread Kevin Martin
Hi, I am trying to find the best way to write a query that has two levels of group by where the outer group by columns are a subset of the inner group by columns. In my example below I want to do an aggregation grouping by per, prod, and mar, then I want aggregate the results of this

Re: [sqlite] sqlar: makeDirectory called with permission bits of file

2019-03-26 Thread Winter, Martin
Hi Richard, Dominique, I downloaded and compiled the latest trunk and can confirm that it fixes this issue. Thanks! Martin > -Ursprüngliche Nachricht- > Von: sqlite-users Im Auftrag > von Dominique Devienne > Gesendet: Dienstag, 26. März 2019 11:57 > An: SQLi

Re: [sqlite] sqlar: makeDirectory called with permission bits of file

2019-03-25 Thread Winter, Martin
, as the directories are created without the "x" bit set. I think that is not what the user expects and should be changed. Thanks Martin > -Ursprüngliche Nachricht- > Von: Winter, Martin (CT RDA IOT EWT-DE) > Gesendet: Montag, 11. März 2019 08:01

Re: [sqlite] picking random subset of rows

2019-03-18 Thread Kevin Martin
> On 18 Mar 2019, at 16:15, Dan Kennedy wrote: > > > In SQLite, a correlated sub-query on the RHS of an IN(...) operator may be > rerun every time the IN(...) test is required. And if that sub-query contains > "random()" it might return a different result every time. > > Your words suggest

[sqlite] picking random subset of rows

2019-03-18 Thread Kevin Martin
Hi, I am trying to use a correlated subquery with an 'order by random() limit 2' to pick upto two random rows for each value in the outer query. I am not sure if I am doing this correctly, but the number of rows I am getting seems to vary randomly which doesn't make sense to me. If i replace

[sqlite] sqlar: makeDirectory called with permission bits of file

2019-03-11 Thread Winter, Martin
, instead of using those of the file. In the current code base the relevant code can be found at https://www.sqlite.org/src/artifact?udc=1=on=e7864c391e14ccaf line 481ff, where the "mode" variable is used both to create the file and to create the directory, if necessar

[sqlite] Feature request: ARM64 support in Universal Windows Platform

2018-11-19 Thread Martin Suchan
available for Universal Windows Platform apps targeting x86, x64 and ARM, but not yet for ARM64. Since I don't have access to the issue tracker, this is a feature request to add support for the ARM64 platform as well, if possible. Thanks. Best Regards Martin Suchan

[sqlite] weekday time modifier

2018-09-23 Thread Kevin Martin
Hi, Not sure if this is me misreading it, but the description of the weekday modifier in the documentation seems a bit ambiguous. It says: > The "weekday" modifier advances the date forward to the next date where the > weekday number is N. Sunday is 0, Monday is 1, and so forth. It is not

Re: [sqlite] Huge RAM usage when sqlite is started from another thread

2018-07-13 Thread Martin Vystrčil
ng to use just small databases (1 - 3MB). What do you think about this technique ? I think, it could be very dangerous when size of database grows, but that should not happen. Thank you and Regards, Martin 2018-07-13 20:58 GMT+02:00 Richard Hipp : > On 7/13/18, Martin Vystrčil wrote: > >

Re: [sqlite] Huge RAM usage when sqlite is started from another thread

2018-07-13 Thread Martin Vystrčil
be completely fine for me, to allocate like 1MB or so, but this is way too much, although not used. Thank you for your help, Best Regards, Martin 2018-07-13 17:31 GMT+02:00 Bob Friesenhahn : > On Fri, 13 Jul 2018, Richard Hipp wrote: > >> >> The OP's test program (with a bug fix,

[sqlite] Huge RAM usage when sqlite is started from another thread

2018-07-13 Thread Martin Vystrčil
-thread?noredirect=1#comment89612124_51317823 Every help is highly appreciated. Best Regards, Martin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] CLI thoughts

2018-04-15 Thread Martin
.dat`.txt" .once -let f select word from words order by 1; The system call argument maybe just 'todaysfile' which executes. 3. the .load command does not have a complement .loaded; how does one check? Well, just thinking out loud. Than

Re: [sqlite] Enabling MMAP in Android

2017-12-12 Thread Martin Raiber
On 12.12.2017 19:47 Simon Slavin wrote: > On 12 Dec 2017, at 6:27pm, Jens Alfke wrote: > >> On Dec 12, 2017, at 5:46 AM, Simon Slavin wrote: >>> Before you answer that question, you should know that both Windows and >>> macOS have been proved to have

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

2017-11-21 Thread Martin Raiber
On 21.11.2017 17:30 John McKown wrote: > On Tue, Nov 21, 2017 at 10:27 AM, Drago, William @ CSG - NARDA-MITEQ < > william.dr...@l3t.com> wrote: > >>> I really need to come up with an alternative to the mailing list. >>> Perhaps some kind of forum system. Suggestions are welcomed. >>> -- >>> D.

[sqlite] Questions regarding the use of a "partial index" as a "covering index"

2017-09-09 Thread Martin Thierer
type from column x1, then it's not used: DROP TABLE tab; CREATE TABLE tab (x1, x2, x3, x4, PRIMARY KEY (x1, x3) ) WITHOUT ROWID; CREATE INDEX ind ON tab (x2) WHERE x4 IS NULL; sqlite> EXPLAIN QUERY PLAN SELECT x1, x2 FROM tab WHERE x4 IS NULL; selectid|order|f

[sqlite] sqlite 3.20.1: Core dump when running query with json functions in subquery

2017-09-03 Thread Martin Thierer
om my own email draft, I also put it here: https://gist.github.com/thierer/f4367232f58a452ff960fe61c3250fbe This is with sqlite 3.20.1 on Arch Linux x86_64. Thanks! (both for looking into this issue and sqlite in general...) Martin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Verison 3.19.2 no longer opens my database

2017-06-09 Thread Martin Lowry
Hi Richard, thanks for the quick reply. Unfortunately compiling the library myself is not an option since I have no C/C++ compiler available. Looks like I'll have to live with my workaround. Cheers, Martin On 09/06/2017 12:40, Richard Hipp wrote: > On 6/9/17, Martin Lowry <m.lo...@hull

Re: [sqlite] Verison 3.19.2 no longer opens my database

2017-06-09 Thread Martin Lowry
PrimaryKey, @AutoInc); if ok then begin Col.ColumnNotNull := NotNull <> 0; Col.ColumnIsPrimaryKey := PrimaryKey <> 0; Col.ColumnIsKey := AutoInc <> 0; end; end; end; ------- Cheers, Martin

[sqlite] Verison 3.19.2 no longer opens my database

2017-06-08 Thread Martin Lowry
). The app is written FPC 3.0.0 with Lazarus 1.6 using the TSQLite3Connection component and queried using a TSQLQuery. Any help resolving this issue would be much appreciated. Cheers Martin ** To view the terms under which this email is distributed, please

Re: [sqlite] Bug: Text compare doesn't work, if column name matches text literal enclosed in double quotes

2017-04-20 Thread Andreas Martin
Hello, this is apparently not a bug. I have just read, that double quoted strings are identifiers and no string literals... (https://sqlite.org/lang_keywords.html) Kindly Regards, Andreas Martin 2017-04-19 13:46 GMT+02:00 Andreas Martin <andi.martin...@googlemail.com>: > Hello, > &

[sqlite] Bug: Text compare doesn't work, if column name matches text literal enclosed in double quotes

2017-04-20 Thread Andreas Martin
l_1="col_2"; The result is empty, if there exists a column named "col_2". Using single quotes fixes this: SELECT * FROM tbl WHERE col_1='col_2'; Kindly regards, Andreas Martin ___ sqlite-users mailing list sqlite-user

[sqlite] Potential small incompatibility 3.15 -> 3.16

2017-01-10 Thread Martin Raiber
Hi, with 3.15: sqlite> PRAGMA quick_check; integrity_check ok with 3.16: sqlite> PRAGMA quick_check; quick_check ok The second one is more intuitive, but existing applications may use the first column name. Regards, Martin Raiber ___ sqlite

[sqlite] Weird chars inserted

2016-12-18 Thread Ariel M. Martin
appreciate any help. Thanks in advance! Ariel M. Martin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Accessing sqlite3Apis pointer when loading sqlite3 dll/so.

2016-10-29 Thread Kevin Martin
Hi, I have a shared library that internally uses a statically linked sqlite for a few different internal tasks. Amongst these there is some code that provides a few virtual tables. I would like to extend the interface of the library so that as well as it’s normal interface, it can be accessed

Re: [sqlite] Random IOERR_SHORT_READ in sqlite3_prepare_v2

2016-09-15 Thread Martin Raiber
On 16.09.2016 00:53 Simon Slavin wrote: > On 15 Sep 2016, at 11:38pm, Martin Raiber <mar...@urbackup.org> wrote: > >> There are two instances in the program where the sqlite database file is >> opened >> and closed outside of sqlite3 (to backup the database

Re: [sqlite] Random IOERR_SHORT_READ in sqlite3_prepare_v2

2016-09-15 Thread Martin Raiber
. Solution seems to be to not close the database file after opening it and to reuse the file handle (on Linux). On 14.09.2016 13:05 Martin Raiber wrote: > Hi, > > there have been three reports by users using my software of SQLite > 3.12.0 returning SQLITE_IOERR

Re: [sqlite] Random IOERR_SHORT_READ in sqlite3_prepare_v2

2016-09-14 Thread Martin Raiber
On 14.09.2016 13:26 Simon Slavin wrote: > Check the hard disk format for format errors (fsck). > > Run "PRAGMA integrity_check" on the database file. > > Is the database file on a disk inside the computer running the SQLite calls, > or is it accessed across a network ? > > Do you use any PRAGMAs

Re: [sqlite] Random IOERR_SHORT_READ in sqlite3_prepare_v2

2016-09-14 Thread Martin Raiber
On 14.09.2016 13:31 Dan Kennedy wrote: > On 09/14/2016 06:05 PM, Martin Raiber wrote: >> there have been three reports by users using my software of SQLite >> 3.12.0 returning SQLITE_IOERR and logging a SQLITE_IOERR_SHORT_READ >> (522). Specifically: >> >> 201

[sqlite] Random IOERR_SHORT_READ in sqlite3_prepare_v2

2016-09-14 Thread Martin Raiber
e WAL file is bigger than a certain size Thanks for any help! Regards, Martin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] SQLITE_CANTOPEN on Android

2016-04-24 Thread Martin Trnovec
ong and heavy transactions with long statments (INSERT OR REPLACE ... SELECT ... FROM ... )and we don't want that device is running out of memory so is the lenght of transaction somehow influencing size of temp file ? kr Martin > > > Regards, > Clemens >

[sqlite] SQLITE_CANTOPEN on Android

2016-04-22 Thread Martin Trnovec
IR" or is there a better way? kr Martin D?a 22.04.2016 o 15:22 Richard Hipp nap?sal(a): > On 4/22/16, Martin Trnovec wrote: >> It seems that the problem is/was that the application can't create >> transient files in the "." directory returned by >> os_unix.c

[sqlite] SQLITE_CANTOPEN on Android

2016-04-22 Thread Martin Trnovec
ient files , there are some check but all off them passed. Setting the correct temp directory helped but Is there a preffered way how to set a user temp director for sqlite ? I saw some chances via env variable SQLITE_TMPDIR but not sure if that's the best practise ? kr Martin D?a 22.04.20

[sqlite] SQLITE_CANTOPEN on Android

2016-04-22 Thread Martin Trnovec
"select 1" ) - and the amount of row to be inserted is larger (currently it fails if it's 9226 rows but not with 9225 rows) the same code works perfectly on Windows or Mac OS o iOS, when we dropped the trigger it works also perfectly on Android ? Any hints ? Martin

[sqlite] Is there something like PHPAdmin for SQLite

2016-04-20 Thread Martin Kucej
I use phpLiteAdmin. It has served me well. https://www.phpliteadmin.org/ On 04/20/2016 11:12 AM, Cecil Westerhof wrote: > I am blowing the horn for SQLite. ;-) A colleague of mine likes it in > principal, but he provides web hosting with a database. He has to provide > his clients with a web

[sqlite] sqlite3 update hook data

2016-04-18 Thread Martin Trnovec
. A by the way do anybody have any info when sqlite3_preupdate_hook will be available in the stable version cause this feature seems to be in the code since 2011 ;) ? With regards Martin.

[sqlite] Assertion hit in sqlite3VarintLen

2016-03-04 Thread Martin Raiber
Hi, I have used sqlite3VarintLen outside of SQLite and noticed that the assertion in this function is hit if the highest bit is set (and it returns 10 when it should return 9). E.g. with sqlite3VarintLen(0xF000); It could be that this is not relevant to SQLite as it is guaranteed

[sqlite] Function patternCompare() not EBCDIC friendly

2015-12-30 Thread Roland Martin
Did you face the same issue? Did you find a solution? Anybody willing to help here giving guidance on what should be changed in SQLite to have text data and meta-data stored in UTF-8 format under z/OS? Thank you, mario On 12/30/2015 04:55 PM, Roland Martin wrote: > I have tested the code c

[sqlite] Function patternCompare() not EBCDIC friendly

2015-12-30 Thread Roland Martin
I have tested the code change on z/OS and it works. Thanks for the quick turnaround! Roland Martin -Original Message- From: drhsqlite at gmail.com [mailto:drhsql...@gmail.com] On Behalf Of Richard Hipp Sent: Wednesday, December 30, 2015 9:08 AM To: SQLite mailing list Cc: rolandsmartin

[sqlite] Function patternCompare() not EBCDIC friendly

2015-12-30 Thread Roland Martin
lues are mostly >0x80 these checks can produce invalid results on IBM z/OS. Thanks for the help. Roland Martin

[sqlite] SQLite C# Windows Store Apps

2015-10-22 Thread Martin Křížek
h examples or documentation) packages that really works with Windows Store Apps posted to Store? Thanks in advance. Best regards Martin Krizek

[sqlite] UNIQUE constraint failed: ip_addr.pid

2015-09-14 Thread Martin Engelschalk
Hi Petr, if you Google for "database table primary key" the first few results lead to quite good explanations. Also, the english wikipedia's article "Unique key" explains primary keys. HTH Martin Am 14.09.2015 22:25 schrieb Petr L?z?ovsk? : > > I had googled

[sqlite] UNIQUE constraint failed: ip_addr.pid

2015-09-14 Thread Martin Engelschalk
Hello Petr, defining the column pid as INTEGER PRIMARY KEY you added an implicit contraint; a primary key means that only one record with a given value of pid can exist in the table. See https://www.sqlite.org/lang_createtable.html#rowid Martin Am 14.09.2015 um 21:04 schrieb Petr L?z?ovsk

[sqlite] FTS: Escaping MATCH expressions

2015-09-09 Thread Martin Kucej
FTS3/4 replaces non-alphanumeric characters with spaces. I do the same for strings that I match in my applications. Something like: preg_replace('/[^\*\da-z\x{0080}-\x{}]/ui', ' ', $string); On Wed, Sep 9, 2015 at 7:56 AM, Lohmann, Niels, Dr. (CQTN) wrote: > Hi there, > > I have a question

[sqlite] FTS4 - simulate phrase with NEAR/0

2015-08-27 Thread Martin Kucej
On Thu, Aug 27, 2015 at 1:02 PM, Scott Hess wrote: > NEAR/0 will probably not care about ordering. Ah, yes. You are correct. This match expression: MATCH 'column:word1 NEAR/0 column:word2 NEAR/0 column:word3' matcher both "word1 word2 word3" and "word3 word2 word1" phrases. So, it is a no go.

[sqlite] FTS4 - simulate phrase with NEAR/0

2015-08-27 Thread Martin Kucej
Hi: My name is Martin, I have been using SQLite for web development for several years. Can't say enough good things about it. Recently, I was asked to implement full-text search in an application with up to 1 million items, each with several columns having AND, OR and a phrase search

[sqlite] Determine query type

2015-08-07 Thread Martin Engelschalk
I missed in SQLite occasionally, but I guess it isn't SQL standard. Martin Am 06.08.2015 um 18:57 schrieb Ben Newberg: > Excellent. This is exactly what I was looking for. > > Thanks. > > On Thu, Aug 6, 2015 at 11:50 AM, Stephan Beal > wrote: > >> On Thu, Aug 6, 2

[sqlite] How to get length of all columns in a table

2015-06-01 Thread Martin Engelschalk
(MyColumn2),0) + coalesce(length (MyColumn3),0) from MyTable; HTH Martin Am 01.06.2015 um 17:12 schrieb Drago, William @ CSG - NARDA-MITEQ: > All, > > What is the correct syntax for getting the length of all columns in a table? > I tried > > SELECT Length(*) FROM myTable; > &g

[sqlite] SQL Syntax To Copy A Table

2015-03-26 Thread Martin Engelschalk
Hi Nige, create table as select * from See also http://www.sqlite.org/lang_createtable.html Martin Am 26.03.2015 um 16:29 schrieb Nigel Verity: > Hi > > I know this must seem a fairly dumb question, but I can't find an easy way to > create a copy of table using just SQL. > &

[sqlite] Query help

2015-03-23 Thread Martin Engelschalk
(select groupid,groupname from groups union select 0, '*') g_helper on ( g_helper.groupid = EnginePreferences.groupid); Martin Am 23.03.2015 um 10:04 schrieb Martin Engelschalk: > Hi, > > SELECT engine,coalesce(groupname,*) as > groupname,data

[sqlite] Query help

2015-03-23 Thread Martin Engelschalk
groupid,groupname from groups union select 0, '*') g_helper on ( g_helper.groupid = EnginePreferences.groupid); HTH Martin Am 23.03.2015 um 09:50 schrieb Marco Bambini: > I have a table EnginePreference: > CREATE TABLE EnginePreferences (engine TEXT C

[sqlite] data which when inserted into a table cannot be queried - a bug ?

2015-03-11 Thread Martin Engelschalk
Hi, SELECT oid, ip, name FROM hosts ; 1|a.proper.host.name|2886748296 shows that ip = 'a.proper.host.name ' and name = 2886748296, so of course your queries give no data. The problem is that your insert statement does not name the columns, which is never a good idea. Martin Am 11.03.2015 um

[sqlite] EBCDIC 0xF0-0xF9 sqlite3UpperToLower values incorrect

2015-02-18 Thread Roland Martin
In global.c: #ifdef SQLITE_EBCDIC 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, /* 0x */ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, /* 1x */ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, /* 2x */ 48, 49, 50, 51, 52, 53,

Re: [sqlite] Row filtering prior to aggregate function execution

2014-12-19 Thread Roland Martin
Thanks to everyone for the help. I coded up a user defined function and WHERE ... AND security() = 1 works great. Thanks again - Roland Martin -Original Message- From: Hick Gunter [mailto:h...@scigames.at] Sent: Friday, December 19, 2014 7:39 AM To: 'General Discussion of SQLite

[sqlite] Row filtering prior to aggregate function execution

2014-12-18 Thread Roland Martin
for the help - Roland Martin ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] replace many rows with one

2014-12-10 Thread Martin Engelschalk
Hi Simon, Am 10.12.2014 12:39, schrieb Simon Slavin: Dear folks, A little SQL question for you. The database file concerned is purely for data manipulation at the moment. I can do anything I like to it, even at the schema level, without inconveniencing anyone. I have a TABLE with about

Re: [sqlite] [SQLite]Ba​sic query

2014-12-08 Thread Martin Engelschalk
the database file redsides in exists - the the user executing the program has the permission to read/write in the directory and the database file This is not really the answer to your question, but you can probably solve your problem without debugging into sqlite. Martin. Am 08.12.2014 10:55

Re: [sqlite] [SQLite]Ba​sic query

2014-12-08 Thread Martin Engelschalk
occcur only if you set them in your compiler options. HTH Martin Am 08.12.2014 10:10, schrieb Shinichiro Yoshioka: Hi, I'm about to use sqlite-amalgamation(sqlite3.c) on Visual C++. But although the compiling was successfully finished, even if I set break point on the source code, I can't trace

Re: [sqlite] Search for text in all tables

2014-12-04 Thread Martin Engelschalk
Hi Baruch, in such cases I do a sqlite3_prepare_v2 on "select * from mytable LIMIT 1" and get the column names using sqlite3_column_count and sqlite3_column_name. Martin Am 04.12.2014 11:45, schrieb Baruch Burstein: On Thu, Dec 4, 2014 at 12:18 PM, Paul Sanderson < sa

Re: [sqlite] Search for text in all tables

2014-12-04 Thread Martin Engelschalk
Hi Baruch, no, not with SQL as I know it. Perhaps you can .dump and .output the database to a text file using sqlite3 command shell, replace your text and then create the database from the SQL using .read. HTH Martin Am 04.12.2014 08:44, schrieb Baruch Burstein: Hi, Is it possible

Re: [sqlite] Comparing to NULL in prepared statment

2014-11-05 Thread Martin Engelschalk
Martin Am 05.11.2014 09:46, schrieb Baruch Burstein: Hi all, This is not really a sqlite specific question, but I was wondering if there might be a sqlite specific answer. I prepare the following statement: "SELECT col1 FROM table1 WHERE col2=:val" col2 is a textual string, and may

Re: [sqlite] Make a database read-only?

2014-10-14 Thread Martin Engelschalk
Hi Ross, i don't know if there is a simpler way. Perhaps someone on the list has a better idea. What I wanted to say is that you probanly cannot prevent your downloaders from removing anything you add to make the data read-only. Martin. Am 14.10.2014 13:48, schrieb Ross Altman: Hi Martin

Re: [sqlite] Make a database read-only?

2014-10-14 Thread Martin Engelschalk
or indeed any other mechanism to prevent changes to the data. It is their file after download HTH Martin Am 14.10.2014 08:19, schrieb Ross Altman: I need to host a fixed, unchanging database online, and I want to make sure that anyone who downloads it cannot add to it. Is there any way to set

Re: [sqlite] how to add multiple columns at a time

2014-10-08 Thread Martin Engelschalk
Hello Anand, the syntax diagram at https://www.sqlite.org/lang_altertable.html shows that an alter table statement for sqlite can contain "add column" only once. I myself came against that fact when porting my DDL statements from PostgreSQL to SQLite. So, the answer is "you

Re: [sqlite] The IN (... ) clause

2014-09-14 Thread Martin Engelschalk
Hi Jose, you are probably looking for the between-Operator: Open http://www.sqlite.org/lang_expr.html and search for "The BETWEEN operator" inn you case, date BETWEEN '2014-01-01' AND '2014-01-05' Martin Am 14.09.2014 07:07, schrieb jose isaias cabrera: Greeting

Re: [sqlite] String compare scoring functions

2014-08-29 Thread Martin Engelschalk
For such a comparison, you will have to implement your own function in sqlite using sqlite3_create_function, see http://www.sqlite.org/capi3ref.html#sqlite3_create_function You cann take the suggestions on stackoverflow and convert them to C or at least wrap them in a C function. Martin Am 29.08.2014 00:07

Re: [sqlite] SELECT ... GROUP BY: Bug or misunderstanding?

2014-08-22 Thread Martin Engelschalk
f you do not change the sqlite version. Hope this helps Martin Am 22.08.2014 15:19, schrieb Christoph Wiedemann: SELECT Id, Name, MIN(Score) AS Score FROM Test GROUP BY Name ORDER BY Score -- *Codeswift GmbH * Kräutlerweg 20a A-5020 Salzburg Tel: +49 (0) 8662 / 494330 Mob: +49 (0) 171 / 44876

Re: [sqlite] Question about coalesce and data types

2014-08-21 Thread Martin Engelschalk
Am 21.08.2014 11:39, schrieb Clemens Ladisch: Martin Engelschalk wrote: It seems the solution is to actually pass all bind variable values by their appropriate sqlite3_bind_* - function instead of just using sqlite3_bind_text. However, this means quite a lot of work for me. Isn't it also work

Re: [sqlite] Question about coalesce and data types

2014-08-21 Thread Martin Engelschalk
sqlite3_bind_text. However, this means quite a lot of work for me. Is there a way to write my own coalesce-Function (or indeed any function) so that its result has an affinity? The documentation of the sqlite3_result_* family of functions suggests not. Thank you Martin Am 20.08.2014 12:03

[sqlite] Question about coalesce and data types

2014-08-20 Thread Martin Engelschalk
can be observed if i replace the constant '1' to the right of the = with a bind variable that I bind with sqlite_bind_text. Can someone please explain this to me or point me to some documentation? Thank you Martin -- *Codeswift GmbH * Kräutlerweg 20a A-5020 Salzburg Tel: +49 (0) 8662 / 494330

[sqlite] Problem with coalesce in a where clause with bind variables

2014-08-06 Thread Martin Engelschalk
king for several years. Have I missed something? Thank you Martin ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Bug? sqlite3_column_name returns name of PK for rowid

2014-07-05 Thread Martin Kleusberg
but was working on a SQLite GUI and wondered why I got the same column name twice after executing that SELECT statement. It is good to know, however, better not to start relying on the column names at all; so this is definitely a valuable piece of advice I got here :) Martin On Thursday 03

[sqlite] Bug? sqlite3_column_name returns name of PK for rowid

2014-07-04 Thread Martin Kleusberg
s any required information I didn't provide or any sane explanation please let me know :) Cheers Martin ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] BUG with unnecessary brackets in queries with IN ( SELECT .. )

2014-06-09 Thread Martin Hristov
Simple example : Working (correct result) select id from tbl where id in (select id from tbl) NOT working (incorrect result) : select id from tbl where id in ( ( select id from tbl) ) ___ sqlite-users mailing list sqlite-users@sqlite.org

[sqlite] Bug Report: Case Sensitive Like

2014-06-09 Thread Martin Abel
re Name like '%üabc%'; -- real UTF-8 chars, ASCII encoded as "ü" it does not work - no one of the German ä, ö, ü, Ä, Ö, Ü, ß work case insensitive with the LIKE operator. Please try to fix that. Many thanks, Martin Abel ___ sqlite-users mailin

Re: [sqlite] Application with 'grid' form for entering table data wanted

2014-06-03 Thread Kevin Martin
On 3 Jun 2014, at 15:07, c...@isbd.net wrote: > I'm looking for an application (or *simple* development framework) > which will provide me with an easily accessible grid form for entering > data into a table. I don't know anything about coding a web program, so all this advice related purely

Re: [sqlite] Like and percent character

2014-06-03 Thread Kevin Martin
Are you forming your query with sprintf? It may be worth printing the query you are preparing, to make sure it says what you think it is. Thanks, Kev Sent from my iPhone > On 3 Jun 2014, at 14:53, Micka wrote: > > Hi, > > I'm having trouble with the percent character

Re: [sqlite] calculation of a fraction stored in a text column

2014-02-20 Thread Kevin Martin
On 20 Feb 2014, at 12:54, Patrick Proniewski wrote: > My problem is that my database holds too many different values for > ExposureTime, so the resulting plot is unreadable. I want to be able to "bin" > those values to create a proper histogram. It's not possible to "bin"

[sqlite] SQLite Windows Phone bug

2014-02-19 Thread Martin Zikmund
is highly dependant on SQLite, but this way it is not reliable enough… Thank you very, very much Sincerely Martin Zikmund Sent from Surface Pro ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman

[sqlite] SQLite for Windows Phone bug

2014-02-19 Thread Martin Zikmund
and version 3.8.2. Can you please check if anything can be done? My project is highly dependant on SQLite, but this way it is not reliable enough… Thank you very, very much Sincerely Martin Zikmund Sent from Surface Pro ___ sqlite-users

Re: [sqlite] Proposed enhancement to the sqlite3.exe command-lineshell

2014-02-10 Thread Kevin Martin
On 10 Feb 2014, at 17:57, Richard Hipp wrote: > I think I know how to detect a double-click launch versus a command-line > launch on windows. But I don't know how to do this, or even if it is > possible to do, on Mac or Linux. Anybody have any ideas? For me, It's not so much

Re: [sqlite] struggling with a query

2014-02-08 Thread Kevin Martin
On 8 Feb 2014, at 10:03, Stephan Beal wrote: > i am trying like mad to, but can't seem formulate a query with 2 version > number inputs (1 and 2 in this case) and creates a result set with these > columns: > > - name. must include all names across both versions > -

Re: [sqlite] Send Mail from sqlite

2014-02-07 Thread Kevin Martin
On 7 Feb 2014, at 09:59, Vairamuthu wrote: > Thanks for your response, it will be great help if you can get me some > sample code or algorithms, on that. I'm assuming you're using SQLite embedded within another application on something unix like. Off the top of my

Re: [sqlite] Virtual Table xRowid

2014-02-05 Thread Kevin Martin
On 5 Feb 2014, at 18:40, Dan Kennedy wrote: > But is it the case that your virtual table doesn't handle > anything other than full scans of the entire table contents? If > so, it's probably not a problem if rowids are inconsistent. Thanks for the heads up on the 'or'

[sqlite] Virtual Table xRowid

2014-02-05 Thread Kevin Martin
Hi, My questions are basically: 1) What causes sqlite3 to call xRowid 2) If I don't want to update my virtual table, or do a select ROWID, can I just use an incremental counter, increased on every call to xNext (bearing in mind the order of my data is not guaranteed, so this won't necessarily

[sqlite] sqlite 3.8.X query planner bug with r_tree joins(r_tree utilization not working on joins & cross join has no affect on plan with r_tree joins)?

2013-11-11 Thread Martin Riša
Hello, We are facing performance regression on queries over r_tree tables with any new 3.8.X sqlite version and we are sure it is connected with new versions of sqlite especially with new query planner and r_tree module. We have distincted by now two bugs: First one: We are convienced that new

Re: [sqlite] Database gets locked for other processes

2013-10-29 Thread Martin Kropfinger
cked for other processes > Message-ID: > <cakd4naigijjvwbks7z2-s_v3j+ingts5ugrnft3krjjytex...@mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > On Tue, Oct 29, 2013 at 1:52 PM, Martin <free...@rakor-net.de> wrote: > > > The program is r

[sqlite] Database gets locked for other processes

2013-10-29 Thread Martin
error". Can you tell me if I am doing something wrong, or if there is a good reason for this habbit? All the programs connect to database at startup and close the databaseconnection on program close. Thanks for your help Martin ___ sqlite-users ma

[sqlite] version 3.8 query planner doesn't find same or better plan for simple query over rtree tables

2013-10-01 Thread Martin Riša
Hello , we are facing performance regression in sqlite version 3.8 and higher versions on queries over r-tree tables and are unable to solve them , so we are asking professionals to consider severity of described problem: description is little Littler but , contains everything relevat. we have

[sqlite] problem with sqlite cache

2013-09-11 Thread Martin Šulc
load type sqlite3_pcache from assembly projectname, Version = 1.0.5002.20480, Culture = neutral, PublicKeyToken = null. Thanks for responding. Martin Šulcmail: martin.s...@projectsoft.cz tel: 721142858 ___ sqlite-users mailing list sqlite-users@sqlit

Re: [sqlite] escape quote for csv import

2013-06-19 Thread Steve Martin
Hi > (There is no official CSV standard, and there is no widely supported escaping > mechanism.) Refer to RFC4180 for CSV standard. Steve Martin Technical Lead NEC New Zealand Limited NEC House, Level 6, 40 Taranaki Street, PO Box 1936, Wellington 6140, New Zealand T: 043816

[sqlite] Performance issue with JOIN and large IN operator

2013-05-01 Thread Martin Altmayer
, but in the original query the join is necessary, because I do not only select COUNT(*). I tested this on several Linux machines. Thanks in advance, Martin ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQL Logic error or missing database

2013-04-05 Thread Kevin Martin
On 5 Apr 2013, at 14:12, Rob Collie wrote: > I'm pretty much just including sqlite3.h, sqlite3ext.h, sqlite3.c in a C++ > project and compiling it as a static lib. I don't really know anything about Windows, but this looks a bit different to how I do it on Linux. I think you should only

Re: [sqlite] Joining tow tables with subset of columns from one

2013-03-13 Thread Kevin Martin
On 13 Mar 2013, at 17:44, Paul Sanderson wrote: > I want to join two table by doing a select in the form > > select col1, col2, col3 from table1 as t1, * from table2 as t2 where > t1.col1 = t2.x Are you trying to do: select t1.col1, t1.col2, t1.col3, t2.* from table1 as t1 join table2 as t2

  1   2   3   4   5   6   7   >