Re: [sqlite] Understanding SELECT statement

2018-06-26 Thread Andy Ling
ing this is SELECT aDate FROM TeachingSaturdaysInSchoolYear AS T WHERE T.aDate The AS is optional, but makes it slightly clearer that you are saying use the table TeachingSaturdaysInSchoolYear and call it T. In this case it is a way of saving typing. Regards Andy Ling

Re: [sqlite] This is driving me nuts

2018-05-31 Thread Andy Ling
for all the pages. Andy Ling --- This email has been scanned for email related threats and delivered safely by Mimecast. For more information please visit http:

Re: [sqlite] [External] Re: Always call a value-quoting routine

2018-05-08 Thread Andy Ling
ctually quoting strings? > > It could just indicate someone with a sense of humor who crafted a > name that looks like an injection attack for their company. > More about the reason for the name https://pizzey.me/blog/no

Re: [sqlite] How to get the entry from sqlite db without primary key or rowid order?

2018-03-09 Thread Andy Ling
Whoops, your right. I should have tested. I am more used to MySQL and assumed field was more "standard". Andy Ling -Original Message- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of x Sent: Fri 09 March 2018 13:40 To: SQLite mailing li

Re: [sqlite] How to get the entry from sqlite db without primary key or rowid order?

2018-03-09 Thread Andy Ling
1, 2); So you need to put the same IDs in the FIELD as you have in the IN. HTH Andy Ling -Original Message- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Hegde, Deepakakumar (D.) Sent: Fri 09 March 2018 13:15 To: sqlite-users@mailinglists.sqlite.o

[sqlite] Building 3.22.0 for vxWorks fails

2018-02-19 Thread Andy Ling
((uid_t(*)(void))aSyscall[21].pCurrent) Regards Andy Ling --- This email has been scanned for email related threats and delivered safely by Mimecast. For more informat

Re: [sqlite] Efficient ways to maintaining order rank / row_number() in a rather large set ?

2018-01-09 Thread Andy Ling
the sorting on output, not input. I rather liked Jens solution to use a string to define the sort order. (top of second page of thread) Andy Ling -Original Message- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Eric Grange Sent: Tue 09 January 2018

Re: [sqlite] Sqlite3.6 Command-line delete/update not working with large db file(>280GB)

2017-10-13 Thread Andy Ling
Try changing the "DELETE FROM table WHERE " to "SELECT COUNT(1) FROM table WHERE " and see if you get a number bigger than 0. If not, then your WHERE isn't matching the rows you think it should. Regards Andy Ling -Original Message- From: sqlite-users [mail

Re: [sqlite] XOR operator

2017-10-06 Thread Andy Ling
page says that '<>' means 'non-equals'. This is not the same as the >binary operation 'XOR' since 'non-equals' can yield only two values: true >and >false. Clemens said "For boolean values" So if a and b are limited to the values 0

Re: [sqlite] Sharing data between desktop and Android

2017-09-06 Thread Andy Ling
e information about it? It's not my app, I just use it. It's called MobileSheetsPro. There's more information here http://www.zubersoft.com/mobilesheets/ Mike, the guy that wrote it, is extremely helpful. So if you contact h

Re: [sqlite] Sharing data between desktop and Android

2017-09-06 Thread Andy Ling
s. It has a companion PC app that lets you backup and modify the underlying sqlite database. It transfers the database between Android and PC using a web link. There is a "sync to PC" menu on the app that opens the connecti

Re: [sqlite] Issue with updating database content (C++)

2017-08-30 Thread Andy Ling
You're not deleting any rows, you're just changing the value of the data in the row. What you probably want is something like DELETE FROM BC WHERE PK = '%q'; HTH Andy Ling -Original Message- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Ali

Re: [sqlite] Database version

2017-07-21 Thread Andy Ling
that's up to you to code. There is a PRAGMA user_version you might want to use or you can create your own table with stuff like schema_version in it. Regards Andy Ling --- This email has been scanned for emai

Re: [sqlite] SQLite3.Step fast forward / skipping rows

2017-05-24 Thread Andy Ling
BY clause, then count through to row "rowNumber" to give you the row you asked for. Not much different to the suggestion already made to create a temporary table. Andy Ling -Original Message- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behal

Re: [sqlite] SQLite3.Step fast forward / skipping rows

2017-05-24 Thread Andy Ling
Then when you detect a jump you'll need to use a new search to "jump" to the page you want. Something like SELECT WHERE sortedColumn > lastValue ORDER BY sortedColumn And make sure you have indexes on all the columns that you can sort by. Andy Ling -Original Mess

Re: [sqlite] Using SQLite, how can I search for chars that include a ', similar to OLE DB .Parameters?

2017-01-26 Thread Andy Ling
piler starts complaining. On Thu, Jan 26, 2017 at 9:18 AM, Clyde Eisenbeis <cte...@gmail.com> wrote: > I'm searching the internet for sqlite3_bind_* () examples. > > On Thu, Jan 26, 2017 at 9:14 AM, Andy Ling <andy.l...@s-a-m.com> wrote: >> I think the point is, you ne

Re: [sqlite] Using SQLite, how can I search for chars that include a ', similar to OLE DB .Parameters?

2017-01-26 Thread Andy Ling
I think the point is, you need to use a prepared statement and bind the parameters to it. The bind process handles the special characters. So you will need to create a command string with question mark operators in like stCmdString += " AND fstInfo LIKE ('%' || ?1 || '%') AND fstInfo LIKE

Re: [sqlite] Autoincrement sequence not updated by UPDATE

2016-11-01 Thread Andy Ling
, at 11:44am, Andy Ling <andy.l...@s-a-m.com> wrote: > It remembers.. Ah, neat. Thanks for the testing. And the "show create table" command you used makes it clear that the engine keeps a record for the table. Apparently a single value for the table's primary key

Re: [sqlite] Autoincrement sequence not updated by UPDATE

2016-11-01 Thread Andy Ling
>> It remembers.. >Ah, neat. Thanks for the testing. As a slight aside. It also never resets the value. We had a problem where the number of inserts had incremented the AUTO INCREMENT value to MAXINT (it took a few years). It then stops. We fixed it by changing id to a BIGINT, but you can

Re: [sqlite] Autoincrement sequence not updated by UPDATE

2016-11-01 Thread Andy Ling
[mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Simon Slavin Sent: Tue 01 November 2016 11:42 To: SQLite mailing list Subject: Re: [sqlite] Autoincrement sequence not updated by UPDATE On 1 Nov 2016, at 11:14am, Andy Ling <andy.l...@s-a-m.com> wrote: > MySQL lets y

Re: [sqlite] Autoincrement sequence not updated by UPDATE

2016-11-01 Thread Andy Ling
> Which, according to GB, is what some other SQL engines do: attempts to change > a value > in that column using UPDATE always generate an error. I didn't know that. > I looked it up. > Apparently Microsoft's SQLSERVER blocks it, but I was unable to find > anything mentioning > how any of

Re: [sqlite] Pivot & concat SELECT?

2016-10-17 Thread Andy Ling
To add to the inefficiency :^)... select unit, (sum(1 << bit_position) & 0xff) AS byte1, ((sum(1 << bit_position) >> 8) & 0xff) AS byte2 from table1 where val group by unit; -Original Message- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of

Re: [sqlite] Pivot & concat SELECT?

2016-10-17 Thread Andy Ling
On 17 Oct 2016, at 3:03pm, Igor Tandetnik wrote: > select unit, sum(1 << bit_position) from table1 where val group by unit; Beat me to it. I was going to say select unit, sum(val << bit_position) as byte from table1 group by unit; But yours is slightly more efficient not

Re: [sqlite] 64-bit SQLite3.exe

2016-08-10 Thread Andy Ling
You still seem to have missed the point that several have made. There are lots of people still using 32bit Windows. They cannot use a 64bit SQLite3.exe. Therefore the 32bit one has to stay. The 32bit one will work on a 64bit OS, with restrictions. The number of people who hit those restrictions

[sqlite] How to check if connection to main database is still open or closed before new query ?

2016-03-01 Thread Andy Ling
Simon suggested will work. Regards Andy Ling -Original Message- From: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of a a Sent: Tue 01 March 2016 17:13 To: SQLite mailing list Subject: Re: [sqlite] How to check

[sqlite] I don't know how to cast ‘const unsigned char*’ to a 'const std::string'

2015-08-12 Thread Andy Ling
ing type typedef std::basic_string ustring; ustring s = sqlite3_column_text(..); Maybe that would do what you want and preserve any odd UTF8 characters. Regards Andy Ling --- This email has been scanned for

[sqlite] Query takes 8 seconds on one machine but I abort after 40+ minutes on other machines

2015-07-27 Thread Andy Ling
> > That's a common technique with LEFT JOIN > > Thanks, Igor. > A bit MySQL specific, but shows some options http://explainextended.com/2010/05/27/left-join-is-null-vs-not-in-vs-not-exists-nullable-columns/ Reg

[sqlite] Compiling sqlite as as library

2015-07-02 Thread Andy Ling
gt; It's getting outside my level of expertise (and not really sqlite specific). Try googling, there are lots of results. Maybe something like this will help https://github.com/tpoechtrager/osxcross/issues/11 Regards Andy Ling -

[sqlite] Compiling sqlite as as library

2015-07-02 Thread Andy Ling
re being linked > > (x86_64): > > /Users/prakash-2282/Downloads/sqlite-amalgamation- > 201506301510/libsqlite3.a > I'm guessing, but it looks like your compiling for 64bit and linking to a 32bit system or vice versa. Regards Andy Ling -

[sqlite] Compiling sqlite as as library

2015-07-02 Thread Andy Ling
hat let you tell it which directories to look in. For header files it is normally -I for include directories and for libraries it is -L. So just use these to add the directories that contain your sqlite3.h and libsqlite3.a f

[sqlite] Compiling sqlite as as library

2015-07-02 Thread Andy Ling
r LDFLAGS. The ar command will be something like ar -rus libsqlite3.a sqlite3.o Check the man page for more information HTH Andy Ling --- This email has been scanned for email related threats and delivered safely by

[sqlite] PRAGMA Synchronous safety

2015-03-13 Thread Andy Ling
appy to help, unfortunately (not for me :^) I've never had a corrupted database. Regards Andy Ling

Re: [sqlite] Autoincrement with rollback

2014-11-11 Thread Andy Ling
rollback > doesn't help. > > I really want sqlite to only issue an id once. > Surely the whole point of rollback is that it puts the database back to the state it was in before the transaction started. So everything should be just as if no inserts (or delete

Re: [sqlite] HELP sqlite3 used in vxworks has some problem

2014-09-04 Thread Andy Ling
dRiver that this mess of differences between filing systems makes writing portable code very difficult. Again, I haven't had a reply. Regards Andy Ling ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] HELP sqlite3 used in vxworks has some problem

2014-09-02 Thread Andy Ling
the short answer is that you cannot use SQLite with a database that is stored on your host PC. You must use a file system that is part of the target system. Regards Andy Ling ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] HELP sqlite3 used in vxworks has some problem

2014-09-01 Thread Andy Ling
rted, but a quick test here proves that it isn't. I will try and raise it with WindRiver and see what they say. It may be a general problem with any network filing system under vxWorks. I'm happy that dosFs works. That's all I need for the time being. Regards Andy Ling ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] HELP sqlite3 used in vxworks has some problem

2014-09-01 Thread Andy Ling
l-journal) - (2570) Error executing statement CREATE TABLE t (id INTEGER PRIMARY KEY ASC) - disk I/O error Error message disk I/O error Regards Andy Ling ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] HELP sqlite3 used in vxworks has some problem

2014-09-01 Thread Andy Ling
blem? > > 2014-09-01 13:04 GMT+02:00 Andy Ling <andy.l...@quantel.com>: > > Although this doesn't feel right having to keep extending the list of error > codes that are checked. > > I'm not sure what else can be done though. Maybe some compile options > that let you cho

Re: [sqlite] HELP sqlite3 used in vxworks has someproblem?

2014-09-01 Thread Andy Ling
> -Original Message- > From: Andy Ling > Sent: 29 August 2014 16:15 > To: '???'; sqlite-users@sqlite.org > Subject: RE: Re:RE: [sqlite] HELP sqlite3 used in vxworks has someproblem? > > I would add a printf statement in unixDelete rather than rely on a break po

Re: [sqlite] HELP sqlite3 used in vxworks has someproblem?

2014-08-29 Thread Andy Ling
if that works. Regards Andy Ling From: 王庆刚 [mailto:2004wqg2...@163.com] Sent: 29 August 2014 15:49 To: Andy Ling; sqlite-users@sqlite.org Subject: Re:RE: [sqlite] HELP sqlite3 used in vxworks has someproblem? hi, Andy Ling      I have removed the SQLITE_ENABLE_LOCKING_STYLE compile option, so

Re: [sqlite] HELP sqlite3 used in vxworks has someproblem?

2014-08-29 Thread Andy Ling
OS your host system is running (Windows I assume in your case). Regards Andy Ling From: 163 [mailto:2004wqg2...@163.com] Sent: 29 August 2014 03:34 To: Andy Ling Cc: sqlite-users@sqlite.org; Jan Nijtmans Subject: Re: [sqlite] HELP sqlite3 used in vxworks has someproblem? i find it not enter

Re: [sqlite] HELP sqlite3 used in vxworks has someproblem?

2014-08-28 Thread Andy Ling
Sorry, I meant unixDelete My guess is that because you are using the host filing system vxWorks will be setting yet another error code for a file that doesn’t exist. So it will need another check adding to unixDelete Regards Andy Ling From: 王庆刚 [mailto:2004wqg2...@163.com] Sent: 28 August

Re: [sqlite] HELP sqlite3 used in vxworks has someproblem?

2014-08-28 Thread Andy Ling
Sorry, I meant unixDelete My guess is that because you are using the host filing system vxWorks will be setting yet another error code for a file that doesn’t exist. So it will need another check adding to unixDelete Regards Andy Ling From: 王庆刚 [mailto:2004wqg2...@163.com] Sent: 28 August

Re: [sqlite] HELP sqlite3 used in vxworks has someproblem?

2014-08-27 Thread Andy Ling
ct it has been said this will probably not work in other areas. So it would be good to find out what is causing the disk I/O error. Did you try putting some debug in unixUnlink? Regards Andy Ling From: 王庆刚 [mailto:2004wqg2...@163.com] Sent: 27 August 2014 16:17 To: Andy Ling Cc: sqlite-users@

Re: [sqlite] HELP sqlite3 used in vxworks has someproblem?

2014-08-26 Thread Andy Ling
the second time? i.e. what is the output from the “pwd” command? Can you use that directory as part of a full pathname? I’m glad you have fixed the disk I/O problem. What did you have to do? Are there any more changes that need feeding back into the source? Regards Andy Ling From: 王庆刚 [mailto

Re: [sqlite] HELP sqlite3 used in vxworks has someproblem?

2014-08-25 Thread Andy Ling
in vxWorks 6.9 is 0x380003 So if you are using yet another file system, maybe you are getting a different error code being set. start by adding a printf to unixUnlink to find out if that is your problem. Regards Andy Ling From: 王庆刚 [2004wqg2...@163.com] Sent: 25

Re: [sqlite] HELP sqlite3 used in vxworks has someproblem?

2014-08-14 Thread Andy Ling
_EXTENSION. This certainly compiles and runs to the point of letting me create tables and add and read data. As to locking and threading issues, I will find out over the next few months. Regards Andy Ling From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@

Re: [sqlite] HELP sqlite3 used in vxworks has someproblem?

2014-08-13 Thread Andy Ling
> From: drhsql...@gmail.com [mailto:drhsql...@gmail.com] On Behalf Of Richard > Hipp > Sent: 13 August 2014 12:40 > To: Andy Ling > Cc: General Discussion of SQLite Database > Subject: Re: [sqlite] HELP sqlite3 used in vxworks has someproblem? > OK, I did find so

Re: [sqlite] HELP sqlite3 used in vxworks has someproblem?

2014-08-13 Thread Andy Ling
> -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of Andy Ling > Sent: 13 August 2014 10:06 > To: 'Richard Hipp' > Cc: General Discussion of SQLite Database > Subject: Re: [sqlite] HELP sqlite

Re: [sqlite] HELP sqlite3 used in vxworks has someproblem?

2014-08-13 Thread Andy Ling
r from unixDelete saying it can't delete /ata0:3/testdb.sql-wal. It actually fails twice. My shell output is shown below Regards Andy Ling [quentina]# ls -l drwxrwxrwx 1 0 032768 Aug 13 09:55 logs/ drwxrwxrwx 1 0 032768 Aug 13 09:55 db/ drwxrwxrw

Re: [sqlite] HELP sqlite3 used in vxworks has someproblem?

2014-08-12 Thread Andy Ling
OK, thanks. It isn't limited to 8+3. The dosFs name refers to the FAT nature of the file system, not any filename limitations. In fact files don't have to have a .extension. Regards Andy Ling From: sqlite-users-boun...@sqlite.org [sqlite-users-boun

Re: [sqlite] HELP sqlite3 used in vxworks has someproblem?

2014-08-12 Thread Andy Ling
wrong with the disk or its drivers. I did wonder if SQLite was making any assumptions about current directories or the makeup of a file name. /ata0:3 is an unusual format for a directory name. Anyway, a simple printf in unixDelete tomorrow will reveal all. Regards Andy Ling

Re: [sqlite] HELP sqlite3 used in vxworks has someproblem?

2014-08-12 Thread Andy Ling
Andy Ling From: drhsql...@gmail.com [drhsql...@gmail.com] on behalf of Richard Hipp [d...@sqlite.org] Sent: 12 August 2014 19:15 To: Andy Ling Cc: General Discussion of SQLite Database; 王庆刚 Subject: Re: [sqlite] HELP sqlite3 used in vxworks has someproblem? What

Re: [sqlite] HELP sqlite3 used in vxworks has someproblem?

2014-08-12 Thread Andy Ling
function on vxWorks with dosFs is broken for files that don't exist, so some change is needed. The patch I sent is what Jan and I came up with. Regards Andy Ling From: drhsql...@gmail.com [drhsql...@gmail.com] on behalf of Richard Hipp [d...@sqlite.org

Re: [sqlite] HELP sqlite3 used in vxworks has someproblem?

2014-08-12 Thread Andy Ling
generates a disk I/O error. I assume it is trying to remove a temporary file. Regards Andy Ling From: drhsql...@gmail.com [mailto:drhsql...@gmail.com] On Behalf Of Richard Hipp Sent: 12 August 2014 17:24 To: Andy Ling Cc: General Discussion of SQLite Database; 王庆刚 Subject: Re: [sqlite] HELP sq

Re: [sqlite] HELP sqlite3 used in vxworks has someproblem?

2014-08-12 Thread Andy Ling
run a few simple commands. Created a table, added a few rows and listed them. The compile options I'm using are -DHAVE_UTIME -DSQLITE_OMIT_LOAD_EXTENSION Regards Andy Ling -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sql

Re: [sqlite] HELP sqlite3 used in vxworks has someproblem?

2014-08-12 Thread Andy Ling
> From: drhsql...@gmail.com [mailto:drhsql...@gmail.com] On Behalf Of Richard > Hipp > Sent: 12 August 2014 14:28 > To: Andy Ling > On Tue, Aug 12, 2014 at 9:23 AM, Andy Ling <andy.l...@quantel.com> wrote: >> I have been testing >> the changes Jan has

Re: [sqlite] HELP sqlite3 used in vxworks has someproblem?

2014-08-12 Thread Andy Ling
l :^) Thanks for all the help so far Regards Andy Ling ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLite version 3.8.6 coming soon

2014-08-06 Thread Andy Ling
doesn't appear to have the changes I did with Jan to make it compile under vxWorks. Regards Andy Ling ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] HELP sqlite3 used in vxworks has someproblem?

2014-08-04 Thread Andy Ling
_ > > sqlite-users mailing list > > sqlite-users@sqlite.org > > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > You can find the necessary changes here: > <http://fossil- > scm.org/index.html/vpatch?from=dd5743a8

Re: [sqlite] Building for vxWorks

2014-07-08 Thread Andy Ling
> -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of Eduardo Morras > Sent: 08 July 2014 10:19 > On Mon, 7 Jul 2014 12:44:54 +0000 > Andy Ling <andy.l...@quantel.com> wrote: > > > Building

Re: [sqlite] Building for vxWorks

2014-07-08 Thread Andy Ling
> -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of Jan Nijtmans > Sent: 07 July 2014 20:14 > 2014-07-07 14:44 GMT+02:00 Andy Ling <andy.l...@quantel.com>: > > Removing the SQLITE

Re: [sqlite] Building for vxWorks

2014-07-07 Thread Andy Ling
> -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of Jan Nijtmans > Sent: 07 July 2014 12:24 > To: General Discussion of SQLite Database > Subject: Re: [sqlite] Building for vxWorks > > 2014-07-04 1

Re: [sqlite] Building for vxWorks

2014-07-04 Thread Andy Ling
> -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of Andy Ling > Sent: 27 June 2014 10:27 > To: 'sqlite-users@sqlite.org' > Subject: [sqlite] Building for vxWorks > I now have sqlite running under vxWor

[sqlite] Building for vxWorks

2014-06-30 Thread Andy Ling
need to do to make this work. Thanks Andy Ling ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users