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

2019-05-15 Thread Jose Isaias Cabrera
Nelson, Erik - 2, on Wednesday, May 15, 2019 11:04 AM, wrote... >I maintained an in-house sqlite patch that did this for a number of years... > just made the buffer a little bigger, printed something like > >" set tt.<==HERE" > >It was quite useful for helping application users self-serve their

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

2019-05-15 Thread Jose Isaias Cabrera
R Smith, on Wednesday, May 15, 2019 11:06 AM, wrote... >I of course forgot to remove 'p005' from the list (luckily David >didn't!), so the query should have been: > >UPDATE t AS tx SET b = 'z' WHERE (a,idate) = (SELECT ty.a,MAX(ty.idate) >FROM t AS ty WHERE ty.a = tx.a GROUP BY ty.a) AND a <

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

2019-05-15 Thread Jose Isaias Cabrera
19-02-13 >5 p005a 3 y 4 >2019-02-11 >10 p005a 8 y 4 >2019-02-12 >15 p005 a 7 y 4 >2019-02-13 > >sq

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

2019-05-15 Thread Jose Isaias Cabrera
Hi. I know this has been probably asked before by someone, but imagine the following scenario: create table t (n INTEGER PRIMARY KEY, a, b, c, d, e, idate); insert into t (a, b, c, d, e, idate) values ('p001', 'a', 1, 'n', 4, '2019-02-11'); insert into t (a, b, c, d, e, idate) values ('p002',

Re: [sqlite] SQLite with single writer on Windows network share

2019-05-13 Thread Jose Isaias Cabrera
Andrew Moss, on Monday, May 13, 2019 04:59 AM, wrote... >Many thanks for all your comments and suggestions. I will bear it all in >mind. Are you trying to shut us up? :-) ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] SQLite with single writer on Windows network share

2019-05-11 Thread Jose Isaias Cabrera
Warren Young, on Saturday, May 11, 2019 06:20 PM, wrote... > >On May 11, 2019, at 4:10 PM, Thomas Kurz wrote: > > It should run under Cygwin and WSL. > > I doubt it’s any more difficult to port to Windows than dozens of other > similar > packages like Apache and MySQL. Someone’s just got to

Re: [sqlite] SQLite with single writer on Windows network share

2019-05-08 Thread Jose Isaias Cabrera
Warren Young, on Wednesday, May 8, 2019 12:10 PM, wrote... >On May 8, 2019, at 8:42 AM, Andrew Moss wrote: >How about you give up on the idea of using Windows shares to distribute a >SQLite DB > and use a tool meant for the job, such as BedrockDB? > >https://bedrockdb.com/ Man, I wish this

Re: [sqlite] SQLite with single writer on Windows network share

2019-05-08 Thread Jose Isaias Cabrera
Andrew Moss, on Wednesday, May 8, 2019 10:42 AM, wrote... >We are currently backed into a corner by a customer and are looking at >using an SQLite database hosted on a windows network share (using server >2012 R2 or later). We are well aware this is not advisable and have read

Re: [sqlite] Getting the week of the month from strftime or date functions

2019-05-07 Thread Jose Isaias Cabrera
I apologize to the group for the non-sqlite emails caused by my post. It was just having a little fun. :-) josé ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Getting the week of the month from strftime or date functions

2019-05-07 Thread Jose Isaias Cabrera
Warren Young, on Monday, May 6, 2019 09:15 PM, wrote... On May 6, 2019, at 11:58 AM, Jose Isaias Cabrera wrote: >> someday, as John Lennon sang, "...the world will live as one." ;-) > > Okay, but one *what*? Serious question. Yeah, if I have to explain it to you,

Re: [sqlite] Getting the week of the month from strftime or date functions

2019-05-06 Thread Jose Isaias Cabrera
Yes. :-), per month. From: sqlite-users on behalf of Petite Abeille Sent: Monday, May 6, 2019 03:57 PM To: SQLite mailing list Subject: Re: [sqlite] Getting the week of the month from strftime or date functions > On May 6, 2019, at 19:58, Jose Isaias Cabrera wrote: > >

Re: [sqlite] Getting the week of the month from strftime or date functions

2019-05-06 Thread Jose Isaias Cabrera
Petite Abeille, on Sunday, May 5, 2019 09:10 AM, wrote... >> On May 4, 2019, at 21:24, Thomas Kurz wrote: >True enough, even though one could convert a 'week of year' into a 'week of >month': [clip] > 2019-11-30|2019|11|47|5 > 2019-12-01|2019|12|47|1 <-- > 2019-12-02|2019|12|48|2 >

Re: [sqlite] Getting the week of the month from strftime or date functions

2019-05-02 Thread Jose Isaias Cabrera
Yes, this will work. It's a long story. I am creating a Gantt visual schedule of a project based on the tasks dates, and I want to show the visual effects per weeks. But, you have hit the hammer on the nail, as we say in Spanish. This I can use. Donald Griggs, Thursday, May 2, 2019 04:16

Re: [sqlite] Getting the week of the month from strftime or date functions

2019-05-02 Thread Jose Isaias Cabrera
"week of the month" is not a standard value. As with week of the year, is week #1 the week in which the month starts, the first complete week within the month, or the first week with at least 4 days? - Original Message - From: Jose Isaias Cabrera To: sqlite-users@mailinglists.sql

[sqlite] Getting the week of the month from strftime or date functions

2019-05-02 Thread Jose Isaias Cabrera
Greetings. To break Manuel's constant bug finding emails, :-), I want to get the week of the month from either date or strftime functions. I know I can get the week of the year by doing, SELECT strftime('%W','2019-03-07'); but I need to get the week of that month based on the date. I can

Re: [sqlite] althttpd.c check-in: efdc1b8e66

2019-04-29 Thread Jose Isaias Cabrera
Thanks, Dr. Hipp. Dr. Richard Hipp, on Monday, April 29, 2019 09:18 AM wrote... On 4/29/19, Jose Isaias Cabrera wrote: > > I know I can probably use cygwin to run this tool, but plain Windows is not > an option, right? > Althttpd is built around fork(). Windows does not

Re: [sqlite] althttpd.c check-in: efdc1b8e66

2019-04-29 Thread Jose Isaias Cabrera
I know I can probably use cygwin to run this tool, but plain Windows is not an option, right? Richard Hipp, on Saturday, April 27, 2019 04:49 PM wrote... On 4/27/19, Jungle Boogie wrote: > > Would you ever consider adding support to list an index of a directory? > http://127.0.0.1/files would

Re: [sqlite] .expert output help

2019-04-26 Thread Jose Isaias Cabrera
Dan Kennedy, on Friday, April 26, 2019 12:13 PM wrote... >On 26/4/62 21:30, Jose Isaias Cabrera wrote: >Hey! Somebody tried it out! Thanks! :) I have been using it for a while. ;-) I have been adding INDEXes for queries used a lot... >this query. If you try ".expert -verbose"

Re: [sqlite] Regarding sqlite3 reliability in using in service oriented architecture

2019-04-26 Thread Jose Isaias Cabrera
> You will be hard-pressed to buy a new car these days that isn't > running either QNX or Android or both. Not my '73 Ford Maverick. :-) ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] .expert output help

2019-04-26 Thread Jose Isaias Cabrera
Simon Slavin on Friday, April 26, 2019 10:50 AM wrote... >On 26 Apr 2019, at 3:30pm, Jose Isaias Cabrera wrote: >Once you have defined those indices, execute the ANALZE command, then try >the .expert again. Thanks. >What led to you using WHERE 1=1 ? An apparent bug ? Long story.

[sqlite] .expert output help

2019-04-26 Thread Jose Isaias Cabrera
Greetings. I want to search the DB for all projects owned by "jic" and I have queried the DB with the following: SQLite version 3.28.0 2019-04-16 19:49:53 Enter ".help" for usage hints. sqlite> .expert sqlite> SELECT a.*,sum(b.AnnualDossier) as Dossier FROM Project_List AS a ...> LEFT JOIN

Re: [sqlite] Returning NULL or empty values when the SELECT does not satisfy all of the query

2019-04-08 Thread Jose Isaias Cabrera
of the query On Fri, 5 Apr 2019 18:54:18 + Jose Isaias Cabrera wrote: > Why does this work I don't know what "work" means, but I can explain the difference. With an outer join, JOIN and WHERE are not the same. In analyzing the query, we consider JOIN before WHERE. > select &g

Re: [sqlite] Returning NULL or empty values when the SELECT does not satisfy all of the query

2019-04-05 Thread Jose Isaias Cabrera
values when the SELECT does not satisfy all of the query Hi, On Fri, Apr 5, 2019 at 1:36 PM Jose Isaias Cabrera wrote: > > > Thanks, Simon. Works like a charm... Unless backwards compatibility is important (do you expect to go back to pre-foreign keys implementation), I'd do FOREIGN KEY a

Re: [sqlite] Returning NULL or empty values when the SELECT does not satisfy all of the query

2019-04-05 Thread Jose Isaias Cabrera
list Subject: Re: [sqlite] Returning NULL or empty values when the SELECT does not satisfy all of the query On Fri, 5 Apr 2019 at 14:45, Jose Isaias Cabrera wrote: > > Greetings. > > I have a few tables that I am bringing data from, but I found a bug in my > logic, which I am try

Re: [sqlite] Returning NULL or empty values when the SELECT does not satisfy all of the query

2019-04-05 Thread Jose Isaias Cabrera
Thanks, Simon. Works like a charm... From: Simon Davies Sent: Friday, April 5, 2019 12:24 PM To: SQLite mailing list Subject: Re: [sqlite] Returning NULL or empty values when the SELECT does not satisfy all of the query On Fri, 5 Apr 2019 at 14:45, Jose Isaias Cabrera wrote: > > Gre

Re: [sqlite] Returning NULL or empty values when the SELECT does not satisfy all of the query

2019-04-05 Thread Jose Isaias Cabrera
pr 2019 14:01:20 + Jose Isaias Cabrera wrote: > The owners of the business said that "there will never be...", The perfect opportunity for a CHECK constraint or to enforce a foreign key. --jkl ___ sqlite-users mailing list sqlite-users@

Re: [sqlite] Returning NULL or empty values when the SELECT does not satisfy all of the query

2019-04-05 Thread Jose Isaias Cabrera
day, April 5, 2019 09:50 AM To: SQLite mailing list Subject: Re: [sqlite] Returning NULL or empty values when the SELECT does not satisfy all of the query On 5 Apr 2019, at 2:45pm, Jose Isaias Cabrera wrote: > then do this, > > select > a.*, b.* from t as a join z as b on a.a = b

[sqlite] Returning NULL or empty values when the SELECT does not satisfy all of the query

2019-04-05 Thread Jose Isaias Cabrera
Greetings. I have a few tables that I am bringing data from, but I found a bug in my logic, which I am trying to see if I can make it work. Please look at this scenario create table t (n INTEGER PRIMARY KEY, a, b, c, d, e, idate); insert into t (a, b, c, d, e, idate) values ('p001', 'a', 1,

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

[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] cmd line question on import

2019-03-22 Thread Jose Isaias Cabrera
Windows 7, DOS command line. It works, thanks. From: sqlite-users on behalf of Simon Slavin Sent: Friday, March 22, 2019 11:15 AM To: SQLite mailing list Subject: Re: [sqlite] cmd line question on import On 22 Mar 2019, at 3:06pm, Jose Isaias Cabrera wrote: > I have a db in c:\t

[sqlite] cmd line question on import

2019-03-22 Thread Jose Isaias Cabrera
Greetings! I have this file, import.sql, which contains a structure like this, BEGIN; INSERT OR REPLACE INTO Project_List values ( ... ); ... ... INSERT OR REPLACE INTO Project_List values ( ... ); END; There are 253 INSERT OR REPLACE statements. What I am trying to do is to run it from the

Re: [sqlite] INSERTing from another table data

2019-03-19 Thread Jose Isaias Cabrera
of]) https://www.w3schools.com/sql/sql_select_into.asp On 2019/03/19 3:15 PM, Jose Isaias Cabrera wrote: > Greetings. > > I have this table, > > > create table a (a, b, c); > > insert into a values (1, 2, 3); > > insert into a values (2, 3, 4); > > insert into a value

Re: [sqlite] INSERTing from another table data

2019-03-19 Thread Jose Isaias Cabrera
Ignore this. Sorry. I should always count to 10 before sending things. Apologies. From: sqlite-users on behalf of Jose Isaias Cabrera Sent: Tuesday, March 19, 2019 09:15 AM To: sqlite-users@mailinglists.sqlite.org Subject: [sqlite] INSERTing from another

[sqlite] INSERTing from another table data

2019-03-19 Thread Jose Isaias Cabrera
Greetings. I have this table, create table a (a, b, c); insert into a values (1, 2, 3); insert into a values (2, 3, 4); insert into a values (3, 4, 5); insert into a values (4, 5, 6); insert into a values (5, 6, 7); insert into a values (6, 7, 8); and I also have this table, create

Re: [sqlite] TCL API: substitution of NULL for non-existent variables

2019-02-28 Thread Jose Isaias Cabrera
Dr. Hipp, I don't care what Simon says about you; you're ok in my book. ;-) From: sqlite-users on behalf of Richard Hipp Sent: Thursday, February 28, 2019 12:31 PM To: SQLite mailing list Subject: Re: [sqlite] TCL API: substitution of NULL for non-existent variables On 2/28/19, Donald Allen

Re: [sqlite] TCL API: substitution of NULL for non-existent variables

2019-02-28 Thread Jose Isaias Cabrera
Hi. This is from a newbie, so take it with a grain of salt... :-) There is always the DB field declaration of NOT NULL, but, if you are going to allow a NULL value in that field, then, h... From: sqlite-users on behalf of Donald Allen Sent: Thursday, February 28, 2019 08:35 AM To:

Re: [sqlite] Getting data from two JOIN tables

2019-02-27 Thread Jose Isaias Cabrera
SQL, the language of the free... choices: JOIN or commas (,)... ;-) From: sqlite-users on behalf of Dominique Devienne Sent: Wednesday, February 27, 2019 09:47 AM To: SQLite mailing list Subject: Re: [sqlite] Getting data from two JOIN tables On Wed, Feb 27, 2019 at 3:42 PM Jose Isaias

Re: [sqlite] Getting data from two JOIN tables

2019-02-27 Thread Jose Isaias Cabrera
] On Behalf Of Dominique Devienne Sent: Wednesday, February 27, 2019 9:06 AM To: SQLite mailing list Subject: Re: [sqlite] Getting data from two JOIN tables On Wed, Feb 27, 2019 at 2:18 PM Jose Isaias Cabrera wrote: > Thanks. This is exactly what I needed. So, there is really no JOIN here, > or

Re: [sqlite] Getting data from two JOIN tables

2019-02-27 Thread Jose Isaias Cabrera
Thanks, Dominique. From: sqlite-users on behalf of Dominique Devienne Sent: Wednesday, February 27, 2019 09:06 AM To: SQLite mailing list Subject: Re: [sqlite] Getting data from two JOIN tables On Wed, Feb 27, 2019 at 2:18 PM Jose Isaias Cabrera wrote: > Thanks. This is exactly wha

Re: [sqlite] Getting data from two JOIN tables

2019-02-27 Thread Jose Isaias Cabrera
] On Behalf Of Jose Isaias Cabrera >Sent: Tuesday, 26 February, 2019 20:09 >To: sqlite-users@mailinglists.sqlite.org >Subject: [sqlite] Getting data from two JOIN tables > > >Sorry to bother you with this simple request, but I can't seem to >come up with a solution. Imagine

[sqlite] Getting data from two JOIN tables

2019-02-26 Thread Jose Isaias Cabrera
Sorry to bother you with this simple request, but I can't seem to come up with a solution. Imagine these tables: create table t (n INTEGER PRIMARY KEY, a, b, c, d, e, idate); insert into t (a, b, c, d, e, idate) values ('p001', 'a', 1, 'n', 4, '2019-02-11'); insert into t (a, b, c, d, e,

Re: [sqlite] Problem with clause "where X in (...)"

2019-02-13 Thread Jose Isaias Cabrera
Click on the link at the bottom of this email... From: sqlite-users on behalf of Don Walsh Sent: Wednesday, February 13, 2019 03:09 PM To: SQLite mailing list Subject: Re: [sqlite] Problem with clause "where X in (...)" Get me of this list On Wed, Feb 13,

Re: [sqlite] Checking differences in tables

2019-02-13 Thread Jose Isaias Cabrera
James K. Lowden, on Tuesday, February 12, 2019 11:39 AM, wrote... >On Tue, 12 Feb 2019 15:05:29 +0000 >Jose Isaias Cabrera wrote: > >> >SELECT * From t WHERE datestamp = "20190208" >> >> Ok, Simon, I'll bite; :-) Imagine this table: >> >> t (n

Re: [sqlite] Checking differences in tables

2019-02-13 Thread Jose Isaias Cabrera
Man, you guys are so smart... Thanks, Keith. From: sqlite-users on behalf of Keith Medcalf Sent: Wednesday, February 13, 2019 02:31 AM To: SQLite mailing list Subject: Re: [sqlite] Checking differences in tables insert into t (a, b, c, d, e, idate) values ('p001', 1, 2, (SELECT d FROM t

Re: [sqlite] Checking differences in tables

2019-02-12 Thread Jose Isaias Cabrera
Kees Nuyt, on Tuesday, February 12, 2019 07:55 PM, wrote... >On Tue, 12 Feb 2019 21:03:47 +, you wrote: >> David Raymond, on Tuesday, February 12, 2019 03:48 PM, wrote... >>> Not sure if this will fix your specific issue, but if you're using a query >>> as a single >>> value it needs to be in

Re: [sqlite] Checking differences in tables

2019-02-12 Thread Jose Isaias Cabrera
ite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Jose Isaias Cabrera Sent: Tuesday, February 12, 2019 3:42 PM To: James K. Lowden; SQLite mailing list Subject: Re: [sqlite] Checking differences in tables >James K. Lowden, on Tuesday, February 12, 2019 11:39 AM, wro

Re: [sqlite] Checking differences in tables

2019-02-12 Thread Jose Isaias Cabrera
>James K. Lowden, on Tuesday, February 12, 2019 11:39 AM, wrote... >>On Tue, 12 Feb 2019 15:05:29 +0000 >>Jose Isaias Cabrera wrote: >> >>> >SELECT * From t WHERE datestamp = "20190208" >>> >>> Ok, Simon, I'll bite; :-) Imagine this

Re: [sqlite] Checking differences in tables

2019-02-12 Thread Jose Isaias Cabrera
James K. Lowden, on Tuesday, February 12, 2019 11:39 AM, wrote... >On Tue, 12 Feb 2019 15:05:29 +0000 >Jose Isaias Cabrera wrote: > >> >SELECT * From t WHERE datestamp = "20190208" >> >> Ok, Simon, I'll bite; :-) Imagine this table: >> >> t (n

Re: [sqlite] Checking differences in tables

2019-02-12 Thread Jose Isaias Cabrera
Simon Slavin, on Saturday, February 9, 2019 11:02 AM, wrote... >On 9 Feb 2019, at 3:49pm, Jose Isaias Cabrera wrote: > >> Imagine this scenario:I have this table, >> >> t (a PRIMARY KEY, b, c, d, e) >> >> that contains yesterda

Re: [sqlite] Why Error: ambiguous column name: ProjID

2019-02-11 Thread Jose Isaias Cabrera
Simon Slavin, on Monday, February 11, 2019 11:53 AM, wrote... >On 11 Feb 2019, at 4:51pm, Jose Isaias Cabrera wrote: > >> Thanks. Yes, sometimes I should revise 3 or 4 times before asking. :-) As >> soon as I sent it, I figured it out. > >It wouldn't help. You can r

Re: [sqlite] Why Error: ambiguous column name: ProjID

2019-02-11 Thread Jose Isaias Cabrera
J. King, on Monday, February 11, 2019 11:25 AM, wrote... >On February 11, 2019 11:16:32 AM EST, Jose Isaias Cabrera >wrote: >> >>This SQL, >> >>SELECT a.*,b.*,c.Area,d.Bus_Area FROM Master_Project_List AS a >>LEFT JOIN Master_Project_List_Extra AS

Re: [sqlite] Why Error: ambiguous column name: ProjID

2019-02-11 Thread Jose Isaias Cabrera
Never mind. Sorry guys for the wasted bandwidth. From: sqlite-users on behalf of Jose Isaias Cabrera Sent: Monday, February 11, 2019 11:16 AM To: sqlite-users@mailinglists.sqlite.org Subject: [sqlite] Why Error: ambiguous column name: ProjID This SQL

[sqlite] Why Error: ambiguous column name: ProjID

2019-02-11 Thread Jose Isaias Cabrera
This SQL, SELECT a.*,b.*,c.Area,d.Bus_Area FROM Master_Project_List AS a LEFT JOIN Master_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 WHERE ProjID IN

Re: [sqlite] Checking differences in tables

2019-02-09 Thread Jose Isaias Cabrera
Warren Young, on Saturday, February 9, 2019 06:15 PM, wrote... >On Feb 9, 2019, at 12:20 PM, Jose Isaias Cabrera wrote: >> >> Warren Young, on Saturday, February 9, 2019 01:36 PM, wrote... >> > >> >You may be interested in the sqldiff program that comes with

Re: [sqlite] Checking differences in tables

2019-02-09 Thread Jose Isaias Cabrera
Warren Young, on Saturday, February 9, 2019 01:36 PM, wrote... >On Feb 9, 2019, at 8:49 AM, Jose Isaias Cabrera wrote: >> >> Perhaps, Dr. Hipp and the team can write a quick PRAGMA that can do >> something like this, > >You may be interested in the sqldiff pro

Re: [sqlite] Checking differences in tables

2019-02-09 Thread Jose Isaias Cabrera
WOW Clemens Ladisch on Saturday, February 9, 2019 11:44 AM wrote, Jose Isaias Cabrera wrote: >> t_20190208 (a PRIMARY KEY, b, c, d, e). >> >> I create a new table, >> >> t (a PRIMARY KEY, b, c, d, e) >> >> and insert a set of "new data", whic

Re: [sqlite] Checking differences in tables

2019-02-09 Thread Jose Isaias Cabrera
Simon Slavin on Saturday, February 9, 2019 11:02 AM wrote... On 9 Feb 2019, at 3:49pm, Jose Isaias Cabrera wrote: > Imagine this scenario:I have this table, > > t (a PRIMARY KEY, b, c, d, e) > > that contains yesterday's data. Today, I rename that table to, > > t_20190208

[sqlite] Checking differences in tables

2019-02-09 Thread Jose Isaias Cabrera
Hi Gurus. Imagine this scenario:I have this table, t (a PRIMARY KEY, b, c, d, e) that contains yesterday's data. Today, I rename that table to, t_20190208 (a PRIMARY KEY, b, c, d, e). I create a new table, t (a PRIMARY KEY, b, c, d, e) and insert a set of "new data", which contains changes

Re: [sqlite] Multiple SELECTs in one call

2019-02-07 Thread Jose Isaias Cabrera
Slavin Sent: Wednesday, February 6, 2019 11:30 PM To: SQLite mailing list Subject: Re: [sqlite] Multiple SELECTs in one call On 7 Feb 2019, at 4:21am, Jose Isaias Cabrera wrote: > want to use the result of (SELECT a from t where e != 1); to run another > select (SELECT a from t where

Re: [sqlite] Multiple SELECTs in one call

2019-02-07 Thread Jose Isaias Cabrera
anticipated traffic volume. >-Original Message- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of Jose Isaias Cabrera >Sent: Wednesday, 6 February, 2019 21:22 >To: sqlite-users@mailinglists.sqlite.org >Subject: [sqlite] Multiple SELE

[sqlite] Multiple SELECTs in one call

2019-02-06 Thread Jose Isaias Cabrera
Greetings. I need some help from you gurus to have multiple selects, but the sequence is important. For example, create table t (a, b, c, d, e); insert into t values (1,2,3,4,5); insert into t values (2,2,3,4,5); insert into t values (3,3,3,3,3); insert into t values (4,1,1,1,1); insert into

Re: [sqlite] JOINning two tables provides no data

2019-01-20 Thread Jose Isaias Cabrera
Darn ti! Thanks. On Saturday, January 19, 2019 07:20 AM, J. King wrote, >On January 18, 2019 12:54:32 PM EST, Jose Isaias Cabrera >wrote: >> >>sqlite> select a.a, a.b, a.c, b.d, b.e as q from a join b on a.a=b.a >>where a.a = 1; >>sqlite> >> >

[sqlite] JOINning two tables provides no data

2019-01-19 Thread Jose Isaias Cabrera
Greetings! Imagine this scenario, create table a (a, b, c); create table b (a, d, e); insert into a values (1, 2, 3); insert into a values (2, 3, 4); insert into a values (3, 4, 5); select a.a, a.b, a.c, b.d, b.e as q from a join b on a.a=b.a where a.a = 1; sqlite> select a.a, a.b, a.c, b.d,

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

2017-11-22 Thread jose isaias cabrera
On Wednesday, November 22, 2017 10:32 AM, Wout Mertens wrote... In SO you have very little socialization going on. This mailinglist is GUILTY! And I am not Dominique. :-) This is the only mailing list that I am subscribed twice. There is so much knowledge in here, that it should be kept

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

2017-11-22 Thread jose isaias cabrera
This one. That one. Esta. Aquella. :-) -Original Message- From: Peter Da Silva Sent: Wednesday, November 22, 2017 8:12 AM To: SQLite mailing list Subject: Re: [sqlite] Many ML emails going to GMail's SPAM On 11/21/17, 9:54 PM, "sqlite-users on behalf of jose isaias ca

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

2017-11-21 Thread jose isaias cabrera
I have been having the same problem for a while. But, this is using Windows Live Mail client. I would love to keep the list email driven, if possible. But, whatever it is, I will be part of the next phase of communication. Thanks. -Original Message- From: Keith Medcalf Sent:

Re: [sqlite] Missing data on SELECT

2017-11-03 Thread jose isaias cabrera
age- From: sqlite-users [mailto:sqlite-users- boun...@mailinglists.sqlite.org] On Behalf Of jose isaias cabrera Sent: Thursday, 2 November, 2017 22:26 To: SQLite mailing list Subject: Re: [sqlite] Missing data on SELECT You're right. Apologies. The right SELECT would be, SELECT cl.ProjID F

Re: [sqlite] Missing data on SELECT

2017-11-03 Thread jose isaias cabrera
Thanks. -Original Message- From: Simon Slavin Sent: Friday, November 3, 2017 12:40 AM To: SQLite mailing list Subject: Re: [sqlite] Missing data on SELECT On 3 Nov 2017, at 4:32am, jose isaias cabrera <jic...@barrioinvi.net> wrote: It's a long story, but what I woul

Re: [sqlite] Missing data on SELECT

2017-11-02 Thread jose isaias cabrera
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 jose isaias cabrera >Sent: Thursday, 2 November, 2017 16:02 >To: SQLite m

Re: [sqlite] Missing data on SELECT

2017-11-02 Thread jose isaias cabrera
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 jose isaias cabrera Sent: Thursday, 2 November, 2017 16:02 To: SQLite mailing list S

[sqlite] Missing data on SELECT

2017-11-02 Thread jose isaias cabrera
Greetings. Apologies for the long email, or long set of data. I have these two tables in two different database files, but for easy setup, I have place them in the same DB. Having these data, CREATE TABLE ProjectsALL ( id integer primary key, ProjID integer, login, cust, proj, XtraB );

Re: [sqlite] Any change to make this query better?

2017-10-21 Thread jose isaias cabrera
:38 -0400 "jose isaias cabrera" <jic...@barrioinvi.net> wrote: Greetings! This takes about 1.5 minutes to run with sqlite v3.20.1 with about 200K records sqlite> explain query plan ...> SELECT ...> O.XtraF AS PortalID, ...> O.ProjID, ...> O.

Re: [sqlite] Any change to make this query better?

2017-10-20 Thread jose isaias cabrera
-users-boun...@mailinglists.sqlite.org] On Behalf Of jose isaias cabrera Sent: Friday, October 20, 2017 2:22 PM To: SQLite mailing list Subject: [sqlite] Any change to make this query better? Greetings! This takes about 1.5 minutes to run with sqlite v3.20.1 with about 200K records sqlite> expl

[sqlite] Any change to make this query better?

2017-10-20 Thread jose isaias cabrera
Greetings! This takes about 1.5 minutes to run with sqlite v3.20.1 with about 200K records sqlite> explain query plan ...> SELECT ...> O.XtraF AS PortalID, ...> O.ProjID, ...> O.A_No AS GTXNo, ...> O.proj AS ProjName, ...> O.lang AS Target, ...> (SELECT max(edate)

Re: [sqlite] Grouping and grabbing one item

2017-10-18 Thread jose isaias cabrera
Ok, I missed a condition. Imagine this set of data, CREATE TABLE Tasks ( id INTEGER PRIMARY KEY, Pid INTEGER, cust TEXT, period TEXT, bd TEXT, ed TEXT, task TEXT, target TEXT, amt REAL ); INSERT INTO Tasks (Pid,cust,period,bd,ed,task,target,amt) VALUES

Re: [sqlite] Grouping and grabbing one item

2017-10-18 Thread jose isaias cabrera
This last one does appear faster... Thanks. -Original Message- From: no...@null.net Sent: Wednesday, October 18, 2017 3:17 PM To: SQLite mailing list Subject: Re: [sqlite] Grouping and grabbing one item On Wed Oct 18, 2017 at 07:57:24PM +0200, Darko Volaric wrote: select

Re: [sqlite] Grouping and grabbing one item

2017-10-18 Thread jose isaias cabrera
://sandersonforensics.com/forum/content.php?195-SQLite-Forensic-Toolkit -Forensic Toolkit for SQLite email from a work address for a fully functional demo licence On 18 October 2017 at 18:23, jose isaias cabrera <jic...@barrioinvi.net> wrote: CREATE TABLE Tasks ( id INTEGER PRIMARY KEY, Pid INTEGER, bd TEX

Re: [sqlite] Grouping and grabbing one item

2017-10-18 Thread jose isaias cabrera
Tasks where Pid=1 group by target HAVING amt > 0; On Oct 18, 2017, at 7:23 PM, jose isaias cabrera <jic...@barrioinvi.net> wrote: CREATE TABLE Tasks ( id INTEGER PRIMARY KEY, Pid INTEGER, bd TEXT, ed TEXT, task TEXT, target TEXT, amt REAL ); INSERT INTO Tasks (Pid,bd,ed,task,target,am

[sqlite] Grouping and grabbing one item

2017-10-18 Thread jose isaias cabrera
CREATE TABLE Tasks ( id INTEGER PRIMARY KEY, Pid INTEGER, bd TEXT, ed TEXT, task TEXT, target TEXT, amt REAL ); INSERT INTO Tasks (Pid,bd,ed,task,target,amt) VALUES (1,'2017-09-27','2017-09-27','QUOTE','es-ES fr-FR it-IT',0); INSERT INTO Tasks (Pid,bd,ed,task,target,amt) VALUES

Re: [sqlite] Updating 3 tables based on the ProjID

2017-08-22 Thread jose isaias cabrera
Muchas gracias. -Original Message- From: Simon Slavin Sent: Tuesday, August 22, 2017 6:32 PM To: SQLite mailing list Subject: Re: [sqlite] Updating 3 tables based on the ProjID On 22 Aug 2017, at 11:08pm, jose isaias cabrera <jic...@barrioinvi.net> wrote: LSOpenProje

Re: [sqlite] Updating 3 tables based on the ProjID

2017-08-22 Thread jose isaias cabrera
On Tuesday, August 22, 2017 4:47 PM Simon Slavin wrote... On 22 Aug 2017, at 8:45pm, jose isaias cabrera <jic...@barrioinvi.net> wrote: So, is there a way of combining these three INSERTS into one? You may be able to combine the three SELECTs into one using UNION. I don’t know if

[sqlite] Updating 3 tables based on the ProjID

2017-08-22 Thread jose isaias cabrera
Greetings! I have OpenProjects, OpenSubProjects, OpenJobs and each have an unique key called ProjID. I want to update a backup for each based on XtraB != client.LSOpenProjects.XtraB So, is there a way of combining these three INSERTS into one? ATTACH

Re: [sqlite] Explain results help...

2017-08-17 Thread jose isaias cabrera
Jens Alfke wrote... On Aug 16, 2017, at 8:36 PM, jose isaias cabrera <jic...@barrioinvi.net> wrote: The following query is taking a bit too long for my taste. I did a quick query with explain and I got this… The output of EXPLAIN QUERY PLAN is a lot easier to understand; have you

[sqlite] Explain results help...

2017-08-16 Thread jose isaias cabrera
Greetings! The following query is taking a bit too long for my taste. I did a quick query with explain and I got this... Anything I can do to make it faster? Yes, I know I need to do some major work on rearranging, but anything else? sqlite> ATTACH

Re: [sqlite] Compiler warning "gethostuuid() is disabled" building SQLite for iOS

2017-08-16 Thread jose isaias cabrera
Simon Slavin wrote... to cater for the lowest level of geekery. I think that is the first time I have seen this statement... :-) I know a few folks with that description. josé ___ sqlite-users mailing list

Re: [sqlite] Suggestion: Pre-release Snapshots versioning

2017-08-05 Thread jose isaias cabrera
Richard Hipp wrote... On 8/4/17, jose isaias cabrera <jic...@barrioinvi.net> wrote: Right now, when I went to a machine that I had upgraded with a snapshot, I saw that the version was 3.20.0. But when I compared the DLL file size and date, they were different. It would be nice fo

[sqlite] Suggestion: Pre-release Snapshots versioning

2017-08-04 Thread jose isaias cabrera
Greetings! Thanks for this wonderful tool! Dr. Hipp and team, thanks. A suggestion I have is that the pre-release snapshots have some type of versioning. Right now, when I went to a machine that I had upgraded with a snapshot, I saw that the version was 3.20.0. But when I compared the DLL

Re: [sqlite] Poll: Include the recent sqlite3_column_name() fix in the upcoming 3.20.0 release?

2017-07-31 Thread jose isaias cabrera
Funny. :-) (the sneezing lately...) I say, let's add the change to 3.20.0. -Original Message- From: Peter Da Silva Sent: Monday, July 31, 2017 11:58 AM To: SQLite mailing list Subject: Re: [sqlite] Poll: Include the recent sqlite3_column_name() fix in the upcoming 3.20.0 release?

Re: [sqlite] UTF8-BOM not disregarded in CSV import

2017-06-26 Thread jose isaias cabrera
At the bottom... -Original Message- From: Eric Grange Sent: Monday, June 26, 2017 3:09 AM To: SQLite mailing list Subject: Re: [sqlite] UTF8-BOM not disregarded in CSV import Alas, there is no end in sight to the pain for the Unicode decision to not make the BOM compulsory for UTF-8.

Re: [sqlite] problem with special letters

2017-05-26 Thread jose isaias cabrera
Make sure your CSV file is save as UTF-8 with encoding. If it is, then the import piece of Lazarus does not pick up UTF8 characters correctly. If any text file has an encoding or Byte Order Mark (BOM) at the beginning of the file, a good program should be able to interpret the correct

Re: [sqlite] Fwd: SELECT Max(IndexedField) doesn't use partial index

2017-05-10 Thread jose isaias cabrera
Scott Robison wrote... Yes, it might just need to walk through a larger data set. If nulls are rare, there probably wouldn't be much of a difference (not in front of a computer to check). If the column was mostly nulls, and a lot of rows, it might be a lot faster. Hmmm... Thanks. I have

Re: [sqlite] Fwd: SELECT Max(IndexedField) doesn't use partial index

2017-05-09 Thread jose isaias cabrera
Scott Robison wrote... On Mon, May 8, 2017 at 11:40 AM, Paul van Helden wrote: Hi, I use a lot of indexes on fields that typically contain lots of NULLs, so the WHERE NOT NULL partial indexing seems very useful. However when I compare the "EXPLAIN QUERY PLAN" with a

Re: [sqlite] SQLite Release 3.18.0

2017-04-02 Thread jose isaias cabrera
has changed sqlite> pragma temp.optimize; sqlite> Anyone know what the error message means? On Mon, Apr 3, 2017 at 11:42 AM, jose isaias cabrera <jic...@barrioinvi.net> wrote: Thanks, Dr. Hipp for the new release of SQLite v3.18.0. One of bullets of the new Added the PRAGMA o

[sqlite] SQLite Release 3.18.0

2017-04-02 Thread jose isaias cabrera
Thanks, Dr. Hipp for the new release of SQLite v3.18.0. One of bullets of the new Added the PRAGMA optimize command is, (Not yet implemented) Create indexes that might have been helpful to recent queries. May I also suggest that the tool also provides info on useless indexes. Thanks. josé

Re: [sqlite] need help to implement a VTAB on a already sorted table

2017-03-31 Thread jose isaias cabrera
Some examples of these would be great, Dr. Hipp. Thanks. On 2017-03-31 09:06, Richard Hipp wrote: > On 3/31/17, aotto wrote: > >> I already have a working implementation with [a] close [to] empty >> *xBestIndex and *xFilter. >> >> 6) I expect for a primitive WHERE

Re: [sqlite] Developing a SQLite3 DB remotely

2017-03-24 Thread jose isaias cabrera
We have a 10 user SharedDB SQLite based app, and after correcting the UPDATEs and INSERTS with BEGIN;s and END;s We have never experienced corruption. Every so often we do get lockups, but, never corruptions. There are a lot of checks for results, etc., so, ... -Original Message-

Re: [sqlite] Why isn't my time formatting working?

2017-03-08 Thread jose isaias cabrera
Rob Richardson wrote... But the strftime() function is supposed to work with whatever format I give it, isn't it? According to the documentation, %d is a two-digit day, %m is a two-digit month, and so on. Is there truly no way to convert my original string into a datetime object? I

Re: [sqlite] SQLite 3.18.0 pre-release snapshot

2017-03-06 Thread jose isaias cabrera
Richard Hipp wrote... On 3/6/17, jose isaias cabrera <jic...@barrioinvi.net> wrote: Richard Hipp wrote... Have you ever wondered when you should run ANALYZE on an SQLite database? It is tricky to figure out when that is appropriate. The Thanks for this. I actually run this A

<    1   2   3   4   5   6   7   >