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 with

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 tha

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 from

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 http://mailinglists.sqlite.org

Re: [sqlite] Help with sqlite3_value_text

2019-04-15 Thread Keith Medcalf
l Message- >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&

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 thoug

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 *)sqlite3_value_t

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 mailing

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 restri

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
o Heaven 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 sqli

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 t

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 wa

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 Unicode)

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 character

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 asc

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 t

Re: [sqlite] Help with INDEXing a query

2019-04-03 Thread Luuk
On 3-4-2019 19:34, Jose Isaias Cabrera wrote: Never mind, guys. I was missing the INDEX for the table for the first left join: CREATE INDEX PLE_ProjID ON Project_List_Extra (ProjID); Everything is nice, now. Thanks. From: Jose Isaias Cabrera Sent: Wednesday, April 3, 2019 01:02 PM To: sql

Re: [sqlite] Help with INDEXing a query

2019-04-03 Thread Jose Isaias Cabrera
Never mind, guys. I was missing the INDEX for the table for the first left join: CREATE INDEX PLE_ProjID ON Project_List_Extra (ProjID); Everything is nice, now. Thanks. From: Jose Isaias Cabrera Sent: Wednesday, April 3, 2019 01:02 PM To: sqlite-users@mailinglists.sqlite.org Subject: [sqli

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 1

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 pe

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 is

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 fil

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 a

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 bunch

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) for

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 > h

Re: [sqlite] Help!

2018-10-27 Thread R Smith
On 2018/10/27 8:39 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 having the text in a fie

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 >

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 it?

Re: [sqlite] Help!

2018-10-02 Thread Keith Medcalf
at 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

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 forma

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" < > sqlite

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' M:\sqlite3\sqlite3\build>sqlite3 test.db SQLite version 3.23.0 2018-04-02 11:04

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 them as columns? > > There

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 AFAI

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 email attachment? Anyone interested in

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, you'l

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 downloaded > sqlite-amalgam

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 example, column a is the P

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 obvious mention about

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 number: > > https://www.sqlite.org/src/tktview/f484b65f3d623059

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 d...@sqlite.org ___

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" to reopen on a persisten

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 ... > datetime(...,"unixepo

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 sqli

Re: [sqlite] Help with left joins

2017-11-20 Thread x
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 rows, which will carry over to the >> next joins. > Thanks David, I did say C

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 th

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 on behalf of Simon Slavin 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:09am, x wrote: > explain > select ColA from TblA > left join TblB using (Col

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 asked for columns from the t

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, howe

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 debugging purposes, pleas

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
Either don't store it on a network drive or right click, select properties and unlock (see https://social.technet.microsoft.com/Forums/en-US/20700886-2000-4c52-b706-aa1fb32d3dfb/cant-view-chm-file-contents?forum=W8ITProPreRel). I think. Graham Sent from my Samsung Galaxy S7 - powered by Three -

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 Microsoft’s display code.

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 malloc()/realloc()/free() by defau

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 it

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, re

Re: [sqlite] Help with custom collation

2017-02-02 Thread x
: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 y

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 ___ sqlite-users

Re: [sqlite] Help with custom collation

2017-02-02 Thread x
ite-users@mailinglists.sqlite.org> Subject: Re: [sqlite] Help with custom collation On 02/02/2017 02:08 AM, x wrote: > Thanks Clemens. You’re right about changing the UTF8String* to char* as it > now works but when trying it with a column containing Unicode characters it > didn’t. I’d have l

Re: [sqlite] Help with custom collation

2017-02-02 Thread Dan Kennedy
ate_collation16() should point to a buffer containing a utf-16 string. Not utf-8. Dan. From: Clemens Ladisch<mailto:clem...@ladisch.de> Sent: 01 February 2017 17:32 To: sqlite-users@mailinglists.sqlite.org<mailto:sqlite-users@mailinglists.sqlite.org> Subject: Re: [sql

Re: [sqlite] Help with custom collation

2017-02-02 Thread Hick Gunter
Sorry misread that you are attempting to write a custom collation. -Ursprüngliche Nachricht- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Hick Gunter Gesendet: Donnerstag, 02. Februar 2017 09:06 An: 'SQLite mailing list' Betreff: R

Re: [sqlite] Help with custom collation

2017-02-02 Thread Hick Gunter
The interface your (simple) function must support is: void xFunc(sqlite3_context*,int,sqlite3_value**) with the first parameter being the sqlite3_context, the second parameter being the number of arguments passed in, and the third parameter being an array of pointers to unprotected sqlite3_value

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

2017-02-01 Thread Shaobo He
Thanks, Richard. I think that I fully understand what happens now. Thanks again for your patience. May I ask that do you see null pointer deferences during development regularly? Shaobo Richard Hipp 于2017年2月1日周三 下午6:52写道: > On 2/1/17, Shaobo He wrote: > > Thanks for your reply. I repeated the e

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

2017-02-01 Thread Richard Hipp
On 2/1/17, Shaobo He wrote: > Thanks for your reply. I repeated the experiment by setting > db->mallocFailed upon return. You are right that there is no segmentation > fault (there were some assertion failures: e.g, "sqlite3OomClear: Assertion > `db->lookaside.bDisable>0' failed"). Instead I got e

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

2017-02-01 Thread Shaobo He
Thanks for your reply. I repeated the experiment by setting db->mallocFailed upon return. You are right that there is no segmentation fault (there were some assertion failures: e.g, "sqlite3OomClear: Assertion `db->lookaside.bDisable>0' failed"). Instead I got error messages saying out of memory. I

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

2017-02-01 Thread Richard Hipp
On 2/1/17, Shaobo He wrote: > > Basically, the error trace indicate that `sqlite3SrcListAppend` can return > a null pointer under the presence of OOM and this return value can > propagate to somewhere in the program, resulting in a null pointer > deference. An OOM condition inside of sqlite3SrcLi

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

2017-02-01 Thread Shaobo He
Hi Richard, all, It's so nice of you to help out. Now we understand better what we should do to reduce the number of false positives. Thanks a lot. I'm sorry to bother you again. But it would be great if you could provide some feedback on the new error trace returned by our tool. Basically, the

Re: [sqlite] Help with custom collation

2017-02-01 Thread x
y 2017 17:32 To: sqlite-users@mailinglists.sqlite.org<mailto:sqlite-users@mailinglists.sqlite.org> Subject: Re: [sqlite] Help with custom collation x wrote: > int Compare(void* Data, int Len1, const void *s1, int Len2, const void *s2) > { > const UTF8String *S1 = st

Re: [sqlite] Help with custom collation

2017-02-01 Thread Clemens Ladisch
x wrote: > int Compare(void* Data, int Len1, const void *s1, int Len2, const void *s2) > { > const UTF8String *S1 = static_cast(s1), > *S2 = static_cast(s2); > return 0; > } > > if (sqlite3_create_collation(SQLiteDB, "Compare", SQLITE_UTF8, NULL, > &Compare) != SQLI

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

2017-01-31 Thread Richard Hipp
On 1/31/17, Shaobo He wrote: > Hi there, > > My name is Shaobo He and I am a graduate student at University of Utah. I > am applying a couple of static analysis tools to C projects. The tools I am > using reports a few partial error traces about null pointer dereferences. I > was wondering if you

Re: [sqlite] Help with assigning default values...

2016-12-20 Thread jose isaias cabrera
Thanks. Yes, saw it. -Original Message- From: Simon Slavin Sent: Tuesday, December 20, 2016 11:54 PM To: SQLite mailing list ; jic...@barrioinvi.net Subject: Re: [sqlite] Help with assigning default values... On 20 Dec 2016, at 9:37pm, jose isaias cabrera wrote: Trying to learn

Re: [sqlite] Help with assigning default values...

2016-12-20 Thread Simon Slavin
On 20 Dec 2016, at 9:37pm, jose isaias cabrera wrote: > Trying to learn or understand constraints. Will you please look at the > following... Answers were posted to the mailing list. If you’re not seeing them there’s something wrong with your subscription. Simon. __

Re: [sqlite] Help Installing SQLite on a Windows 8.1 PC

2016-07-08 Thread Simon Slavin
On 6 Jul 2016, at 8:29pm, Krista M Whipple wrote: > I have downloaded the two 64-bit Windows files on my Windows 8.1 PC, but I > cannot get SQLite to install on my PC. > > > > Any help or directions would be greatly appreciated, I understand the source of your confusion. Unlike other databa

Re: [sqlite] Help Installing SQLite on a Windows 8.1 PC

2016-07-07 Thread Donald Griggs
Hi Krista, Regarding: I have downloaded the two 64-bit Windows files on my Windows 8.1 PC, Are you referring to sqlite.exe and maybe sqlite.dll ? Regarding: but I cannot get SQLite to install on my PC. I'm not sure I understand you. Maybe you could rewrite this in form of something like

Re: [sqlite] help with query

2015-01-14 Thread snowbiwan
Maybe something like this would work for you: SELECT * FROM table WHERE data1 IN (SELECT data1 FROM table GROUP BY data1 HAVING count(*)>=3); ~snowbiwan -- View this message in context: http://sqlite.1065341.n5.nabble.com/help-with-query-t

Re: [sqlite] help with query

2015-01-13 Thread Keith Medcalf
A correlated subquery: select * from t where (select count(*) from t as b where b.data1 = t.data1) >= 3; or with a subselected set of valid rows: select * from t where data1 in (select data1 from t as b group by data1 h

Re: [sqlite] help with query

2015-01-13 Thread Hajo Locke
Hello, thanks a lot. Works like a charm! I should really do more sql. Thanks, Hajo Am 13.01.2015 um 09:03 schrieb Hick Gunter: Step 1: count the occurrences: SELECT data1,count() AS count FROM table GROUP BY data1; Step 2: get the rows with a count above the limit SELECT data1,count() AS

  1   2   3   4   5   6   7   >