[sqlite] Help with sqlite3TreeViewSelect

2019-07-27 Thread x
I’ve been using this while debugging by inserting the following code just before the return statement at the bottom of the sqlite3Select procedure. freopen("c:/SQLiteData/TreeView.txt","w",stdout); sqlite3TreeViewSelect(0, p, 0); freopen("CON","w",stdout); (NB above only works if you define

Re: [sqlite] Help with sqlite3_value_text

2019-04-16 Thread x
Thanks Keith, that I understand. Thanks also to everyone who contributed to this thread. I’ve learned a lot from it. From: sqlite-users on behalf of Keith Medcalf Sent: Monday, April 15, 2019 4:09:02 PM To: SQLite mailing list Subject: Re: [sqlite] Help

Re: [sqlite] Help with loading .DAT files

2019-04-15 Thread Stephen Chrzanowski
.DAT files can be anything. If you can just use sqlite3.exe to open the .DAT and do proper queries on it (IE: sqlite3.exe yourfile.dat), then it's a proper SQLite3 database, so then you SHOULD be able to use the Attach command. Otherwise, you need to change the .DAT contents to something else

Re: [sqlite] Help with loading .DAT files

2019-04-15 Thread Simon Slavin
On 15 Apr 2019, at 4:48pm, Pablo Boswell (US - ASR) wrote: > I cannot get the following commands > to load anything reasonable (the engine always decides to load the data as > a single TEXT column with a column name of "sqlite3 data"): Please copy-and-paste the first line, and another line

[sqlite] Help with loading .DAT files

2019-04-15 Thread Pablo Boswell (US - ASR)
I am trying to use Command Line Interface (CLI) sqlite3.exe to import .DAT files to an in-memory SQLite database. I cannot get the following commands to load anything reasonable (the engine always decides to load the data as a single TEXT column with a column name of "sqlite3 data"): - .ATTACH -

Re: [sqlite] Help with sqlite3_value_text

2019-04-15 Thread Simon Slavin
I don't know about any of this, but it seems that someone needs to write a 'Unicode' (or 'Multibyte charaacters') page for the SQLite documentation. Simon. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Help with sqlite3_value_text

2019-04-15 Thread Keith Medcalf
sage- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of x >Sent: Monday, 15 April, 2019 04:08 >To: SQLite mailing list >Subject: Re: [sqlite] Help with sqlite3_value_text > >>As long as you use _value_bytes after _text you'r

Re: [sqlite] Help with sqlite3_value_text

2019-04-15 Thread Clemens Ladisch
x wrote: >> As long as you use _value_bytes after _text you're fine... so if any >> conversion did take place the value will be right of the last returned >> string type. > > Could you explain that to me? I’m not sure why any conversion takes place > and, on reading the text below, I would’ve

Re: [sqlite] Help with sqlite3_value_text

2019-04-15 Thread x
>As long as you use _value_bytes after _text you're fine... so if any >conversion did take place the value will be right of the last returned >string type. JD, Could you explain that to me? I’m not sure why any conversion takes place and, on reading the text below, I would’ve thought it would be

Re: [sqlite] Help with sqlite3_value_text

2019-04-14 Thread J Decker
On Sun, Apr 14, 2019 at 5:40 AM x wrote: > On second thoughts JD, can’t use strlen or sqlite3_value_bytes in case > values(1) contains more than a single unicode character. This looks OK. > > Bytes are what you need though; it doesn't matter how big the buffer is, as long as you have all of it.

Re: [sqlite] Help with sqlite3_value_text

2019-04-14 Thread x
On second thoughts JD, can’t use strlen or sqlite3_value_bytes in case values(1) contains more than a single unicode character. This looks OK. # define CHARLEN(x) !(x & 128) ? 1 : (x & 16 ? 4 : (x & 32 ? 3 : 2)) char *c = (char *)sqlite3_value_text(values[0]); char *Sep = (char

Re: [sqlite] Help with sqlite3_value_text

2019-04-14 Thread x
From: J Decker<mailto:d3c...@gmail.com> Sent: 13 April 2019 20:05 To: SQLite mailing list<mailto:sqlite-users@mailinglists.sqlite.org> Subject: Re: [sqlite] Help with sqlite3_value_text >> char *c = (char *)sqlite3_value_text(values[0]); >> char *Sep = (char *)sql

Re: [sqlite] Help with sqlite3_value_text

2019-04-13 Thread J Decker
> // at first byte of Sep > >c += NrBytes; > > } > > sqlite3_result_int(ctx, Count); > > > > > From: sqlite-users on > behalf of Scott Robison > Sent: Friday, April 12, 2019 8:40:19 PM > To: SQLite mai

Re: [sqlite] Help with sqlite3_value_text

2019-04-13 Thread x
emcmp(c, Sep, NrBytes) == 0) Count++; // at first byte of Sep c += NrBytes; } sqlite3_result_int(ctx, Count); From: sqlite-users on behalf of Scott Robison Sent: Friday, April 12, 2019 8:40:19 PM To: SQLite mailing list Subject: Re: [sqlite] Help with

Re: [sqlite] Help with sqlite3_value_text

2019-04-13 Thread x
Thanks for all the help. Things are much clearer now. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Help with sqlite3_value_text

2019-04-12 Thread Warren Young
On Apr 12, 2019, at 1:06 PM, Keith Medcalf wrote: > > Actually you would have to convert the strings to UCS-4. UTF-32 is the new name of that standard: https://en.wikipedia.org/wiki/UTF-32#History > UTF-16 is a variable-length encoding. Only if you’re outside the BMP, which is why I

Re: [sqlite] Help with sqlite3_value_text

2019-04-12 Thread Leland Helgerson
-Original Message- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Scott Robison Sent: Friday, April 12, 2019 2:40 PM To: SQLite mailing list Subject: Re: [sqlite] Help with sqlite3_value_text On Fri, Apr 12, 2019, 1:06 PM Keith Medcalf wrote

Re: [sqlite] Help with sqlite3_value_text

2019-04-12 Thread Scott Robison
On Fri, Apr 12, 2019, 1:06 PM Keith Medcalf wrote: > > Actually you would have to convert the strings to UCS-4. UTF-16 is a > variable-length encoding. An actual "unicode character" is (at this > present moment in time, though perhaps not tomorrow) 4 bytes (64-bits). > That is some impressive

Re: [sqlite] Help with sqlite3_value_text

2019-04-12 Thread Keith Medcalf
eaven says a lot about anticipated traffic volume. >-Original Message- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of Warren Young >Sent: Friday, 12 April, 2019 09:45 >To: SQLite mailing list >Subject: Re: [sqlite] Help with sqlite3_v

Re: [sqlite] Help with sqlite3_value_text

2019-04-12 Thread Richard Damon
> On Apr 12, 2019, at 12:58 PM, x wrote: > > I’ve been asking myself if I could have done the above more efficiently as > sqlite’s converting the original string then I’m converting it and copying > it. While thinking about that I started to wonder how c++ handled utf8/16. > E.g. To access

Re: [sqlite] Help with sqlite3_value_text

2019-04-12 Thread x
Thanks for the replies. There’s plenty for me to look at there. I’ve been in poor health the last 5 years and after almost a year’s break I’m trying to get back into sqlite to preserve my sanity. I’m so rusty my opening post is riddled with errors. I’ve just realised that, before my break, I

Re: [sqlite] Help with sqlite3_value_text

2019-04-12 Thread Warren Young
On Apr 12, 2019, at 8:51 AM, x wrote: > > How do I do the same thing if the string param is a utf-8 or utf-16 string > and the SearchChar is a Unicode character? Convert the characters to 32-bit wide characters first, then iterate over the array of uint32_t or similar. One method is shown by

Re: [sqlite] Help with sqlite3_value_text

2019-04-12 Thread Shawn Wagner
Welcome to the wonderful world of multibyte encodings, and Unicode in particular. Unless you're looking for an ASCII character, you're looking for a substring, not a character. And you're really looking for what's called a codepoint (The entire concept of character gets kind of fuzzy with

Re: [sqlite] Help with sqlite3_value_text

2019-04-12 Thread J Decker
http://utf8everywhere.org/ On Fri, Apr 12, 2019 at 7:51 AM x wrote: > I’m still confused by utf strings. For simplicity, suppose I set up an > sqlite function that takes a single string parameter and I want to scan the > string to count the number of occurrences of a certain character . If I >

Re: [sqlite] Help with sqlite3_value_text

2019-04-12 Thread Dominique Devienne
On Fri, Apr 12, 2019 at 4:51 PM x wrote: > I’m still confused by utf strings. [... I want to scan the string to > count the number of occurrences of a certain character. [...] > How do I do the same thing if the string param is a utf-8 or utf-16 string > and the SearchChar is a Unicode

Re: [sqlite] Help with sqlite3_value_text

2019-04-12 Thread Igor Tandetnik
On 4/12/2019 10:51 AM, x wrote: I’m still confused by utf strings. For simplicity, suppose I set up an sqlite function that takes a single string parameter and I want to scan the string to count the number of occurrences of a certain character . If I knew the string was made up entirely of

[sqlite] Help with sqlite3_value_text

2019-04-12 Thread x
I’m still confused by utf strings. For simplicity, suppose I set up an sqlite function that takes a single string parameter and I want to scan the string to count the number of occurrences of a certain character . If I knew the string was made up entirely of ascii chars I’d do this char *c =

Re: [sqlite] Help with INDEXing a query

2019-04-03 Thread Jose Isaias Cabrera
Thanks. I didn't know this. From: Luuk Sent: Wednesday, April 3, 2019 02:34 PM To: sqlite-users@mailinglists.sqlite.org Subject: Re: [sqlite] Help with INDEXing a query On 3-4-2019 19:34, Jose Isaias Cabrera wrote: > Never mind, guys. I was missing the INDEX for the table for the fi

Re: [sqlite] Help with INDEXing a query

2019-04-03 Thread Luuk
To: sqlite-users@mailinglists.sqlite.org Subject: [sqlite] Help with INDEXing a query Greetings! I am trying to speed up this query, . sqlite> .expert sqlite> select * from testing where a=42; CREATE INDEX testing_idx_0061 ON testing(a); SEARCH TABLE testing USING INDEX testing_idx_00

Re: [sqlite] Help with INDEXing a query

2019-04-03 Thread Jose Isaias Cabrera
: [sqlite] Help with INDEXing a query Greetings! I am trying to speed up this query, SELECT a.*,b.*,c.Area,d.Bus_Area FROM Project_List AS a LEFT JOIN Project_List_Extra AS b ON a.ProjID = b.ProjID LEFT JOIN Bus_IT_Areas_ORGs AS c ON a.IT_OBS = c.IT_OBS LEFT JOIN Business_OBS_List AS d

[sqlite] Help with INDEXing a query

2019-04-03 Thread Jose Isaias Cabrera
Greetings! I am trying to speed up this query, SELECT a.*,b.*,c.Area,d.Bus_Area FROM Project_List AS a LEFT JOIN Project_List_Extra AS b ON a.ProjID = b.ProjID LEFT JOIN Bus_IT_Areas_ORGs AS c ON a.IT_OBS = c.IT_OBS LEFT JOIN Business_OBS_List AS d ON a.Business_OBS = d.Bus_OBS

Re: [sqlite] HELP!

2018-11-13 Thread Chris Locke
> it is almost guaranteed to corrupt the database file if more than one connection tries to access it at the same time. I understand the risks and reasons, but have had numerous databases on our Windows network accessed by 20+ users throughout the day without issue. Thanks, Chris On Sun, Nov

Re: [sqlite] HELP!

2018-11-13 Thread Reid Thompson
On Sun, 2018-11-11 at 00:49 +, am...@juno.com wrote: > [EXTERNAL SOURCE] > > > > November 10, 2018 Dear Good People: I work for a company that has a many > locations with more than one person in every location. I want to share the > databases I have built using SQLITE with some of > the

Re: [sqlite] HELP!

2018-11-11 Thread Jay Kreibich
> On Nov 11, 2018, at 1:24 AM, Clemens Ladisch wrote: > > It's not; SQLite is file based. The only way to share this would be to > make a file share in the company-wide network, i.e., to make the file > \\COMPANYSERVER\SomeShare\MyLittleDB.sqlite directly accessible from > everywhere. (This

Re: [sqlite] HELP!

2018-11-10 Thread Clemens Ladisch
am...@juno.com wrote: > I work for a company that has a many locations with more than one > person in every location. I want to share the databases I have built > using SQLITE with some of the people in each location. Do any of you > good people know is SQLITE on the cloud? It's not; SQLite is

Re: [sqlite] HELP!

2018-11-10 Thread Dingyuan Wang
There are some cloud solutions: https://dbhub.io/ for sharing https://bedrockdb.com/ for distributed hosting 2018/11/11 8:49, am...@juno.com: > November 10, 2018 Dear Good People: I work for a company that has a many > locations with more than one person in every location. I want to share the >

Re: [sqlite] HELP!

2018-11-10 Thread Jens Alfke
> On Nov 10, 2018, at 4:49 PM, am...@juno.com wrote: > > November 10, 2018 Dear Good People: I work for a company that has a many > locations with more than one person in every location. I want to share the > databases I have built using SQLITE with some of the people in each location. > Do

[sqlite] HELP!

2018-11-10 Thread am...@juno.com
November 10, 2018 Dear Good People: I work for a company that has a many locations with more than one person in every location. I want to share the databases I have built using SQLITE with some of the people in each location. Do any of you good people know is SQLITE on the cloud? lf so, I

Re: [sqlite] Help!

2018-11-07 Thread Clemens Ladisch
am...@juno.com wrote: > how to take a database in database (not structure) form--and copy and paste > it into an e-mail A database file is binary; the easiest way would be to attach it. If you want to paste it into the e-mail itself, you have to convert it to text somehow. Either create a

Re: [sqlite] Help!

2018-11-06 Thread Mike King
Hi, Surely it’s just a case of attaching the database file as an attachment to the e-mail. Cheers On Tue, 6 Nov 2018 at 19:52, am...@juno.com wrote: > November 6, 2018 Dear Good People: I would be most appreciative if any of > you how know how to take a database in database (not structure)

[sqlite] Help!

2018-11-06 Thread am...@juno.com
November 6, 2018 Dear Good People: I would be most appreciative if any of you how know how to take a database in database (not structure) form--and copy and paste it into an e-mail, please explain in extremely explicit detail. Thanks much in advance. Respectfully yours, Alex Stavis

Re: [sqlite] Help!

2018-10-27 Thread am...@juno.com
10/27/18 Thanks so much Clements, Respectfully yours, Alex Stavis -- Original Message -- From: Clemens Ladisch To: sqlite-users@mailinglists.sqlite.org Subject: Re: [sqlite] Help! Date: Sat, 27 Oct 2018 21:55:28 +0200 am...@juno.com wrote: > how do I make a field wrap the t

Re: [sqlite] Help!

2018-10-27 Thread am...@juno.com
10/27/18 Thanks so much Clements, Respectfully yours, Alex Stavis -- Original Message -- From: Clemens Ladisch To: sqlite-users@mailinglists.sqlite.org Subject: Re: [sqlite] Help! Date: Sat, 27 Oct 2018 21:55:28 +0200 am...@juno.com wrote: > how do I make a field wrap the t

Re: [sqlite] Help!

2018-10-27 Thread Igor Korot
Hi, On Sat, Oct 27, 2018 at 1:41 PM am...@juno.com wrote: > > 10/27/18 Dear Good People: I have two issues which I have not been able to > solve. Hopefully at least one of you good people know how to do these. The > first is: how do I make a field wrap the text. In other words, rather than >

Re: [sqlite] Help!

2018-10-27 Thread Clemens Ladisch
am...@juno.com wrote: > how do I make a field wrap the text. In other words, rather than having > the text in a field keep going from right to left, when I hit the right > hand margin, how do I make the text automatically go to the next line. The purpose of SQLite is to store data, and to give it

Re: [sqlite] Help!

2018-10-22 Thread Simon Slavin
On 22 Oct 2018, at 10:43pm, Petite Abeille wrote: > You could try the following perhaps: > > Import a CSV File Into an SQLite Table > http://www.sqlitetutorial.net/sqlite-import-csv/ That is a good page. Documentation for the CLI tool it refers to can be found in chapter 8 of

Re: [sqlite] Help!

2018-10-22 Thread Petite Abeille
> On Oct 22, 2018, at 11:35 PM, am...@juno.com wrote: > > October 22, 2018 Hello Good People: I need to import a large bunch of names > (first and last), and id numbers into SQ Lite. How do I do en-mas--as opposed > to copying and pasting each individual name, clock number, etc? I would be >

[sqlite] Help!

2018-10-22 Thread am...@juno.com
October 22, 2018 Hello Good People: I need to import a large bunch of names (first and last), and id numbers into SQ Lite. How do I do en-mas--as opposed to copying and pasting each individual name, clock number, etc? I would be most appreciative if you would give me very explicit directions.

Re: [sqlite] help, sqlite3_get_table return 21,

2018-10-22 Thread Richard Hipp
On 10/22/18, W J wrote: > Hello , > > I'm using sqlite3_get_table() to query some information from sqlite. but > sometimes( not every time), I got error return value: 21. > #define SQLITE_MISUSE 21 /* Library used incorrectly */ > > What is the real meaning of this error? How to correct

[sqlite] help, sqlite3_get_table return 21,

2018-10-22 Thread W J
Hello , I'm using sqlite3_get_table() to query some information from sqlite. but sometimes( not every time), I got error return value: 21. #define SQLITE_MISUSE 21 /* Library used incorrectly */ the version information is follow: #define SQLITE_VERSION"3.8.4.3" #define

Re: [sqlite] Help!

2018-10-02 Thread Keith Medcalf
that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. >-Original Message- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of Simon Slavin >Sent: Tuesday, 2 October, 2018 18:26 >To: SQL

Re: [sqlite] Help!

2018-10-02 Thread Simon Slavin
On 2 Oct 2018, at 11:00pm, am...@juno.com wrote: > As such, I would be most appreciative if someone would e-mail me incredibly > explicit directions on how to import a file in SQLite DB to SQLite studio. The two programs should be able to open the same database files. SQLite has only one

[sqlite] Help!

2018-10-02 Thread am...@juno.com
October 2, 2018 Dear Good People: While I have both SQLite DB and SQlite Studio on I my computer, I have not been able to export files from SQLite DB to SQLite Studio--so that I get all the database functions I need. This involves say putting a field in ascending order, filtering out

[sqlite] Help with ICU

2018-06-24 Thread Jeremy Hill
I used win-builds to install gcc 4.8.3 on windows 10. I am now trying to compile sqlite-amalgamation-324 with ICU enabled. I receive the following: C:\Users\Dev\AppData\Local\Temp\cckZbRTz.o:sqlite3.c:(.text+0xa335a): undefined reference to `u_errorName_51'

Re: [sqlite] Help using 'attach database' or Why is this an error?

2018-04-11 Thread J Decker
On Wed, Apr 11, 2018 at 7:54 AM, Peter Da Silva < peter.dasi...@flightaware.com> wrote: > Try this: > > attach database 'test.db' as con2; > ahh that makes sense. I'll split this into a separte thread for the real issue... > > On 4/11/18, 9:51 AM, "sqlite-users on behalf of J Decker" < >

Re: [sqlite] Help using 'attach database' or Why is this an error?

2018-04-11 Thread Peter Da Silva
Try this: attach database 'test.db' as con2; On 4/11/18, 9:51 AM, "sqlite-users on behalf of J Decker" wrote: When I attempt to use attach database I get an error about 'no such column'

[sqlite] Help using 'attach database' or Why is this an error?

2018-04-11 Thread J Decker
When I attempt to use attach database I get an error about 'no such column' M:\sqlite3\sqlite3\build>sqlite3 test.db SQLite version 3.23.0 2018-04-02 11:04:16es Enter ".help" for usage hints. sqlite> attach database test.db as con2; Error: no such column: test.db sqlite> I was trying to debug

Re: [sqlite] Help with json1 query?

2018-03-15 Thread Charles Leifer
No, the keys would be arbitrarily chosen by the user. The rtree extension could be a possibility, I'll check it out. On Thu, Mar 15, 2018 at 12:56 AM, Wout Mertens wrote: > Can you elaborate on the metadata? Are the keys always the same, in which > case you could store

Re: [sqlite] Help with json1 query?

2018-03-14 Thread Wout Mertens
Can you elaborate on the metadata? Are the keys always the same, in which case you could store them as columns? There's also the https://sqlite.org/rtree.html extension which lets you efficiently query multidimensional range data. If there is truly no schema, what you propose is the only way

Re: [sqlite] Help getting started

2018-03-09 Thread Simon Slavin
On 9 Mar 2018, at 4:42pm, Richard Hipp wrote: > On 3/9/18, Larry Mullings wrote: >> I have a SQLite Bible database. It has >> Bible verses with Strong's numbers and Hebrew. > > Are you willing to share your database? Can you send me a copy via > private

Re: [sqlite] Help getting started

2018-03-09 Thread Richard Hipp
On 3/9/18, Larry Mullings wrote: > I have a SQLite Bible database. It has > Bible verses with Strong's numbers and Hebrew. Are you willing to share your database? Can you send me a copy via private email attachment? -- D. Richard Hipp d...@sqlite.org

Re: [sqlite] Help getting started

2018-03-09 Thread Donald Griggs
Hi Larry, Since you mention sqlite3.exe, I assume you're on Windows. Kudos for compiling your own exe, but if, in future, you find you don't need special compile features, you can always download the current version exe from http://sqlite.org/download.html . If I understand you correctly,

Re: [sqlite] Help getting started

2018-03-09 Thread Simon Slavin
On 9 Mar 2018, at 3:48pm, Larry Mullings wrote: > I'm in need of some serious help. I'm a first timer to anything database. I > have a SQLite Bible database. It has > Bible verses with Strong's numbers and Hebrew. I'd like to add some fields > to the database. I

[sqlite] Help getting started

2018-03-09 Thread Larry Mullings
I'm in need of some serious help.  I'm a first timer to anything database.  I have a SQLite Bible database.  It has Bible verses with Strong's numbers and Hebrew.  I'd like to add some fields to the database.  I downloaded sqlite-amalgamation-322 and compiled it.  Now I have sqlite3.exe and

[sqlite] Help with json1 query?

2018-02-28 Thread Charles Leifer
Hi, I'm prototyping a little graph library using SQLite. My idea is to store vertices in a simple table like this: CREATE TABLE "vertex" ("key" TEXT NOT NULL PRIMARY KEY, "metadata" JSON); CREATE TABLE "edge" ( "id" INTEGER NOT NULL PRIMARY KEY, "src" TEXT NOT NULL, "dest" TEXT NOT

Re: [sqlite] Help with row values

2018-02-14 Thread Simon Slavin
On 14 Feb 2018, at 7:50am, Dominique Devienne wrote: > Thanks. That's interesting. But then, why use it in this context? > Why DRH wants to purposely bypass the index in this case? > How is that relevant to testing tuple / row-values comparisons? --DD In the original

Re: [sqlite] Help with row values

2018-02-13 Thread Dominique Devienne
On Wed, Feb 14, 2018 at 8:44 AM, Clemens Ladisch wrote: > Dominique Devienne wrote: > > in https://www.sqlite.org/src/info/f3112e67cdb27c1a > > to fix above ticket, I see queries with order by +a, > > but in https://www.sqlite.org/lang_select.html#orderby > > I don't see any

Re: [sqlite] Help with row values

2018-02-13 Thread Clemens Ladisch
Dominique Devienne wrote: > in https://www.sqlite.org/src/info/f3112e67cdb27c1a > to fix above ticket, I see queries with order by +a, > but in https://www.sqlite.org/lang_select.html#orderby > I don't see any obvious mention about that +. "Unary plus" does not change the value: sqlite> select

Re: [sqlite] Help with row values

2018-02-13 Thread Dominique Devienne
On Tue, Feb 13, 2018 at 7:09 PM, Richard Hipp wrote: > On 2/13/18, Simon Slavin wrote: > > On 13 Feb 2018, at 5:32pm, x wrote: > > > >> Surely it should be 3 in both cases? > > > > I agree. Here's verification with a version

Re: [sqlite] Help with row values

2018-02-13 Thread x
Thanks Richard. From: Richard Hipp<mailto:d...@sqlite.org> Sent: 13 February 2018 19:17 To: SQLite mailing list<mailto:sqlite-users@mailinglists.sqlite.org> Subject: Re: [sqlite] Help with row values Now fixed on trunk. Thanks for the bug report. -- D. Richard Hipp d..

Re: [sqlite] Help with row values

2018-02-13 Thread Richard Hipp
Now fixed on trunk. Thanks for the bug report. -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Help with row values

2018-02-13 Thread Richard Hipp
On 2/13/18, Simon Slavin wrote: > On 13 Feb 2018, at 5:32pm, x wrote: > >> Surely it should be 3 in both cases? > > I agree. Here's verification with a version number: https://www.sqlite.org/src/tktview/f484b65f3d623059 -- D. Richard Hipp

Re: [sqlite] Help with row values

2018-02-13 Thread Simon Slavin
On 13 Feb 2018, at 5:32pm, x wrote: > Surely it should be 3 in both cases? I agree. Here's verification with a version number: SQLite version 3.19.3 2017-06-27 16:48:08 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME"

[sqlite] Help with row values

2018-02-13 Thread x
sqlite> create table t(a integer primary key); sqlite> insert into t values (1), (3), (5); sqlite> select count(*) from t where a>0; 3 sqlite> select count(*) from t where (a,1)>(0,0); 0 Surely it should be 3 in both cases? If t is created as ‘create table t(a)’ both return 3. Tried it in

Re: [sqlite] Help . . . I want to Export my Firefox Bookmarks to .CSV in one click, using SQLite3 in a .BAT file

2017-11-25 Thread Clemens Ladisch
You have to do two things to run SQL statements from a batch file: 1. Use quotes so that all parameters to sqlite3.exe are a single parameter; and 2. Use quotes so that SQL strings are delimited correctly. e-mail wrote: > sqlite3.exe -csv "C:\...\places.sqlite" "SELECT ... >

[sqlite] Help . . . I want to Export my Firefox Bookmarks to .CSV in one click, using SQLite3 in a .BAT file

2017-11-25 Thread e-mail
This "view" works in "DB Browser for SQLite" to get my Firefox Bookmarks . . . I then export them to Desktop as a .CSV, and run an Excel macro on them . . . SELECT a.id AS ID, a.title AS Title, b.url AS URL, datetime(a.dateAdded/100,"unixepoch","localtime") AS Date FROM moz_bookmarks AS a

Re: [sqlite] help with EXPLAIN QUERY PLAN

2017-11-23 Thread Lutz Horn
Ho, Am 23.11.17 um 17:33 schrieb x: > Can anyone tell me why the detail column sometime states ‘USING INDEX > ’ and other time ‘USING COVERING INDEX ...’? See https://sqlite.org/queryplanner.html#_covering_indices ___ sqlite-users mailing list

[sqlite] help with EXPLAIN QUERY PLAN

2017-11-23 Thread x
Can anyone tell me why the detail column sometime states ‘USING INDEX ’ and other time ‘USING COVERING INDEX ...’? At first I thought USING COVERING INDEX implied the search was searching only the first m columns of an n column index (m less than n) but I’ve also seen USING COVERING INDEX

Re: [sqlite] Help with left joins

2017-11-20 Thread x
Sent: Monday, November 20, 2017 3:55:42 PM To: sqlite-users@mailinglists.sqlite.org Subject: Re: [sqlite] Help with left joins On 2017/11/20 5:33 PM, x wrote: >> Only if ColB, ColC and ColD are unique in their tables. Otherwise each join >> has the potential of returning multiple row

Re: [sqlite] Help with left joins

2017-11-20 Thread R Smith
On 2017/11/20 5:33 PM, x wrote: Only if ColB, ColC and ColD are unique in their tables. Otherwise each join has the potential of returning multiple rows, which will carry over to the next joins. Thanks David, I did say ColB, ColC & ColD were primary keys. Any kind of Query (especially of

Re: [sqlite] Help with left joins

2017-11-20 Thread x
>Only if ColB, ColC and ColD are unique in their tables. Otherwise each join >has the potential of returning multiple rows, which will carry over to the >next joins. Thanks David, I did say ColB, ColC & ColD were primary keys. ___ sqlite-users mailing

Re: [sqlite] Help with left joins

2017-11-20 Thread David Raymond
, November 20, 2017 8:22 AM To: SQLite mailing list Subject: Re: [sqlite] Help with left joins I’m not sure what you’re saying Simon or maybe you’re not sure what I’m asking. I’m not complaining about the fact SQLite fails to drop what I think is a redundant table in the second explain, I’m merely

Re: [sqlite] Help with left joins

2017-11-20 Thread x
? From: sqlite-users <sqlite-users-boun...@mailinglists.sqlite.org> on behalf of Simon Slavin <slav...@bigfraud.org> Sent: Monday, November 20, 2017 12:34:29 PM To: SQLite mailing list Subject: Re: [sqlite] Help with left joins On 20 Nov 2017, at 11:09a

Re: [sqlite] Help with left joins

2017-11-20 Thread Simon Slavin
On 20 Nov 2017, at 11:09am, x wrote: > explain > select ColA from TblA > left join TblB using (ColB) > left join TblC using (ColC) > left join TblD using (ColD) > where ColBX=?; > > there will be no trace of TblC or TblD as they're redundant. Although you have not

[sqlite] Help with left joins

2017-11-20 Thread x
Suppose TblB has primary key ColB and contains a column ColBX TblC has primary key ColC and contains a column ColCX TblD has primary key ColD and contains a column ColDX TblA has primary key ColA and also contains columns ColB, ColC and ColD (i.e. TblB, TblC and TblD are effectively lookup

Re: [sqlite] Help with establishing a connection on NS3 and sqlite DB

2017-03-22 Thread Dan Kennedy
On 03/22/2017 05:58 AM, Ausama Majeed wrote: Hello guys, I am trying to do a connection between a database created with Sqlite and my application in ns3. the sqlite engine is installed on ubuntu 16.04 machine and the output is enabled with ns3.26. I cann't do a simple select query from ns3,

Re: [sqlite] Help with establishing a connection on NS3 and sqlite DB

2017-03-21 Thread Simon Slavin
On 21 Mar 2017, at 10:58pm, Ausama Majeed wrote: > But, select query returns only the table field headers instead of the > required record in the following code > > string Query = " select ActorId, ActorType from ActorInfo where ID =" + > tempProcess.str() +";"; For

[sqlite] Help with establishing a connection on NS3 and sqlite DB

2017-03-21 Thread Ausama Majeed
Hello guys, I am trying to do a connection between a database created with Sqlite and my application in ns3. the sqlite engine is installed on ubuntu 16.04 machine and the output is enabled with ns3.26. I cann't do a simple select query from ns3, however it working through the terminal. I install

Re: [sqlite] Help file has no information

2017-03-13 Thread Rob Richardson
Thank you. That worked. (The button was labelled "unblock", not "unlock") RobR -Original Message- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Graham Holden Sent: Monday, March 13, 2017 2:26 PM To: SQLite mailing list Subjec

Re: [sqlite] Help file has no information

2017-03-13 Thread Graham Holden
Original message From: Rob Richardson <rdrichard...@rad-con.com> Date: 13/03/2017 18:14 (GMT+00:00) To: "General Discussion of SQLite Database (sqlite-users@mailinglists.sqlite.org)" <sqlite-users@mailinglists.sqlite.org> Subject: [sqlite] Help fi

Re: [sqlite] Help file has no information

2017-03-13 Thread Simon Slavin
On 13 Mar 2017, at 6:14pm, Rob Richardson wrote: > The help file that is linked from the System.Data.SQLite home page appears to > have a table of contents but no information. No matter what page I select, > the page does not appear. This is the result of a bug in

[sqlite] Help file has no information

2017-03-13 Thread Rob Richardson
The help file that is linked from the System.Data.SQLite home page appears to have a table of contents but no information. No matter what page I select, the page does not appear. RobR ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Help with Backup API please

2017-02-08 Thread Barry
Ok. My bad for singling out SQLite, I should have rather mentioned that the problem exists with all memory allocation routines (malloc/free or new/delete), at least on windows. A workaround is to pass around allocator / deallocator function pointers with any data structure which contains pointers

Re: [sqlite] Help with Backup API please

2017-02-08 Thread Richard Hipp
On 2/8/17, Barry Smith wrote: > > I believe SQLite doesn't use the standard memory allocation routines, but > instead has its own routines. SQLite has its on memory allocation routines (if you use the right compile-time and start-time options) but it uses system

Re: [sqlite] Help with Backup API please

2017-02-08 Thread Barry Smith
Hi Brett, I believe SQLite doesn't use the standard memory allocation routines, but instead has its own routines. These (might) use global variables. If each module of your application statically links to the SQLite source rather than having SQLite in a common DLL, then each module will have

Re: [sqlite] Help with Backup API please

2017-02-08 Thread Clemens Ladisch
Brett Goodman wrote: > When I call sqlite3_backup_init it throws this error: _/"library /__/ > /__/routine called out of sequence"/_. To you get an error code, or an exception? In the first case, try calling sqlite3_errmsg(). The documentation says: | A call to sqlite3_backup_init() will fail,

[sqlite] Help with Backup API please

2017-02-08 Thread Brett Goodman
Hello Sqlite users. I have a problem I can't solve. I have a C++ DLL project in which I compile the Sqlite amalgamation code. The purpose is to wrap the key Sqlite functions with exported functions I can call from another C++ COM DLL. I'm using VS2003 for this because its part of a legacy

Re: [sqlite] Help with custom collation

2017-02-02 Thread x
17:32 To: SQLite mailing list<mailto:sqlite-users@mailinglists.sqlite.org> Subject: Re: [sqlite] Help with custom collation Perhaps off-topic, but: UTF-16 is generally not recommended, unless you need to work with legacy APIs that require it. It has the same difficulties as UTF-8 (havi

Re: [sqlite] Help with custom collation

2017-02-02 Thread Jens Alfke
Perhaps off-topic, but: UTF-16 is generally not recommended, unless you need to work with legacy APIs that require it. It has the same difficulties as UTF-8 (having to handle characters broken into multi-element sequences) but uses more RAM and isn’t downward compatible with ASCII. Also, since

Re: [sqlite] Help with confirming a couple of error traces

2017-02-02 Thread Richard Hipp
On 2/2/17, Shaobo He wrote: > May I ask that do you see null pointer deferences > during development regularly? Sometimes, but not too often. We get assertion faults more. Or just incorrect answers. -- D. Richard Hipp d...@sqlite.org

  1   2   3   4   5   6   7   8   9   >