[sqlite] Mixing SQlite DLL versions

2009-02-18 Thread jose isaias cabrera
Greetings and salutations. Can one SQLite db be UPDATEd and used by folks using different DLL versions? Long story, but here is the short story... Our department here uses a tool that I created for PM'ing. The D SQLite wrapper that the program uses works fine with v3.6.11. The program is bei

[sqlite] Windows XP: How Can I Get Higher CPU usage from SQLite

2009-02-22 Thread jose isaias cabrera
Greetings! I have a very small database, well, 62.1 MB (65,150,976 bytes), and when I do a search on it, the CPU only goes to 7% and 12% at the most. Sometimes it takes a few seconds to return with the results. I am not complaining about the 5-10 seconds of the returning of the result, but I

Re: [sqlite] Windows XP: How Can I Get Higher CPU usage from SQLite

2009-02-22 Thread jose isaias cabrera
"Alexey Pechnikov" wrote... > Hello! > > On Sunday 22 February 2009 22:56:36 jose isaias cabrera wrote: >> I have left everything default, so I have not set any PRAGMA settings. > > Try this: > pragma cache_size=1; > pragma page_size=16384; > vacuum

Re: [sqlite] Windows XP: How Can I Get Higher CPU usage from SQLite

2009-02-23 Thread jose isaias cabrera
ght that there could be something that I can do. Thanks. > > Fred > > -Original Message- > From: sqlite-users-boun...@sqlite.org > [mailto:sqlite-users-boun...@sqlite.org]on Behalf Of jose isaias cabrera > Sent: Sunday, February 22, 2009 1:57 PM > To: General Dis

Re: [sqlite] Windows XP: How Can I Get Higher CPU usage from SQLite

2009-02-23 Thread jose isaias cabrera
; cycles. > > Work on improving your db, your application and your hard disk. Or buy > enough ram to put everything in etherspace, then go get a cup of > coffee. > Yeah, I would say that he was funny. Thanks. I get it now. :-) josé >> Fred >> >> -Original M

Re: [sqlite] Windows XP: How Can I Get Higher CPU usage from SQLite

2009-02-23 Thread jose isaias cabrera
"Alexey Pechnikov" wrote... > Hello! > > On Sunday 22 February 2009 22:56:36 jose isaias cabrera wrote: >> I have left everything default, so I have not set any PRAGMA settings. > > Try this: > pragma cache_size=1; > pragma page_size=16384; > vacuum

[sqlite] Updating Local and SharedDBs

2009-02-24 Thread jose isaias cabrera
Greetings. My apologies for the lengthiness... We are running an utility with about 5 clients using two DBs: 1. PrimaryPC 2. Shared folder The PrimaryPC contains the original data and changes, while the SharedDB in the Shared Folder is the one that provides original indexing of those records.

Re: [sqlite] Updating Local and SharedDBs

2009-02-24 Thread jose isaias cabrera
"jose isaias cabrera" wrote... > > Greetings. My apologies for the lengthiness... > > We are running an utility with about 5 clients using two DBs: > 1. PrimaryPC > 2. Shared folder > > The PrimaryPC contains the original data and changes, while the SharedDB &

[sqlite] INSERTing OR REPLACEing Together or one at a time

2009-03-02 Thread jose isaias cabrera
Greetings. which command is safer to use: Command #1: BEGIN; INSERT OR REPLACE INTO LSOpenProjects SELECT * FROM c.LSOpenProjects WHERE ProjID = 2000; COMMIT; BEGIN; INSERT OR REPLACE INTO LSOpenSubProjects SELECT * FROM c.LSOpenSubProjects WHERE ProjID =

Re: [sqlite] INSERTing OR REPLACEing Together or one at a time

2009-03-02 Thread jose isaias cabrera
it seems that you want to copy data from an attached database "c" > to the main database. > So, if you want to preserve this relationship in your main database, you > have to use one transaction, Command #2, and rollback in case of failure. > > Martin > > jo

Re: [sqlite] INSERTing OR REPLACEing Together or one at a time

2009-03-02 Thread jose isaias cabrera
most times it works and sometimes it does not. So, I will have to keep track of that. But, thanks for the support. I will keep #2 as the desired SQL. josé > > jose isaias cabrera wrote: >> Ok. That is what I am doing now. Every so often, it fails, for some >> reason.

[sqlite] checking if a record exist or not

2009-03-19 Thread jose isaias cabrera
Greetings... I am updating an sqlite db from another sqlite db and it is working fine, unless the record does not exists. ie. "ATTACH db2 AS client; "; BEGIN; INSERT OR REPLACE INTO LSOpenJobs SELECT * FROM client.LSOpenJobs WHERE login='x' AND XtraB > '2000'

Re: [sqlite] checking if a record exist or not

2009-03-19 Thread jose isaias cabrera
"Igor Tandetnik" wrote... > jose isaias cabrera > wrote: >> I am updating an sqlite db from another sqlite db and it is working >> fine, unless the record does not exists. ie. >> >> "ATTACH db2 AS client; "; >> >> BEGIN; >&

Re: [sqlite] checking if a record exist or not

2009-03-19 Thread jose isaias cabrera
"P Kishor" wrote > On Thu, Mar 19, 2009 at 12:01 PM, jose isaias cabrera wrote: >> >> Greetings... >> >> I am updating an sqlite db from another sqlite db and it is working fine, >> unless the record does not exists. ie. >> >> "ATT

Re: [sqlite] checking if a record exist or not

2009-03-20 Thread jose isaias cabrera
"Igor Tandetnik" wrote... > jose isaias cabrera > wrote: >> I am updating an sqlite db from another sqlite db and it is working >> fine, unless the record does not exists. ie. >> >> "ATTACH db2 AS client; "; >> >> BEGIN

[sqlite] trim'ming a column

2009-12-23 Thread jose isaias cabrera
Greetings and salutations. I would like to trim a column from all white spaces. I know how to do it programmatically, but I would like to do it right to the DB. Is this a possibility? Image this statement: CREATE TABLE LSOpenJobs ( id integer primary key, ProjID integer, subProjID, p

Re: [sqlite] trim'ming a column

2009-12-23 Thread jose isaias cabrera
Griggs, Donald wrote... > Regarding: I know that trim(vEmail) will do it, but what would be the > command to run to trim all of the existing records? > > UPDATE LSOpenJobs > SET vEmail = TRIM(vEmail); > > Given the state of the world economy, I hope that LSOpenJobs is an > ever-expanding table

Re: [sqlite] trim'ming a column

2009-12-23 Thread jose isaias cabrera
Igor Tandetnik wrote... > jose isaias cabrera > wrote: >> I would like to trim a column from all white spaces. I know how to >> do it programmatically, but I would like to do it right to the DB. Is >> this a possibility? > > update mytable set mycolumn=trim(mycol

Re: [sqlite] trim'ming a column

2009-12-23 Thread jose isaias cabrera
Griggs, Donald wrote... >> UPDATE LSOpenJobs >> SET vEmail = TRIM(vEmail); >> >> Given the state of the world economy, I hope that LSOpenJobs is an >> ever-expanding table. ;-) > > Why do you say this? Will the table grow because of this statement? I > have fixed the client data entry to ta

Re: [sqlite] trim'ming a column

2009-12-24 Thread jose isaias cabrera
P Kishor wrote... > On Wed, Dec 23, 2009 at 4:08 PM, jose isaias cabrera wrote: >> >> Greetings and salutations. >> >> I would like to trim a column from all white spaces. I know how to do it >> programmatically, but I would like to do it right to the DB. Is t

[sqlite] INSERT OR Replace Help

2010-03-25 Thread jose isaias cabrera
the following is sqlite> Create table test (t1 primary key, t2 secundary key, t3, t4); sqlite> INSERT or REPLACE into test values ('1','2','3','4'); sqlite> select * from test; 1|2|3|4 sqlite> INSERT or REPLACE into test values ('1','2','3','5'); sqlite> select * from test; 1|2|3|5 sqlite> INSERT

Re: [sqlite] INSERT OR Replace Help

2010-03-25 Thread jose isaias cabrera
"P Kishor" wrote... > In any case, for OP's purpose, and esp. since he seems to be inserting > numbers as strings, as implied by the quoted numbers, he might benefit > from > > CREATE TABLE test ( > t1 TEXT, > t2 TEXT, > t3 TEXT, > t4 TEXT, > PRIMARY KEY(t1, t2) > ); > > I don't know if INSER

[sqlite] UPDATEing a SELECTion in one shot

2010-07-21 Thread jose isaias cabrera
Greetings and salutations. I believe this is possible, but I can not seem to get the syntax from the site. I have these 3 commands and 3 different steps that I want to put into one: 1. result1 = SELECT sum(price) FROM table1 WHERE subProjID = 24; 2. result2 = SELECT sum(price) FROM table2 WHE

Re: [sqlite] UPDATEing a SELECTion in one shot

2010-07-21 Thread jose isaias cabrera
s. Thanks. josé > > On Wed, Jul 21, 2010 at 2:28 PM, jose isaias cabrera > wrote: >> >> Greetings and salutations. >> >> I believe this is possible, but I can not seem to get the syntax from the >> site. I have these 3 commands and 3 different steps th

Re: [sqlite] UPDATEing a SELECTion in one shot

2010-07-21 Thread jose isaias cabrera
Kees Nuyt, out of the goodness of his heart, wrote: > On Wed, 21 Jul 2010 14:28:12 -0400, "jose isaias cabrera" > wrote: > >> >>Greetings and salutations. >> >>I believe this is possible, but I can not seem to get the syntax from the >>site. I

[sqlite] Adding a string in front of what is already in a field

2010-10-10 Thread jose isaias cabrera
Greetings. I would like some help with this scenario... DB name OpenJobs. id,pid,spid,notes 100, 24,32,'this is a test' 101, 24,32,'a different note' 102, 24,32,'yet, another different note' ... What I dould like to do is to update each of those notes by adding a string to the front of data co

Re: [sqlite] Adding a string in front of what is already in a field

2010-10-10 Thread jose isaias cabrera
"P Kishor" wrote... > On Sun, Oct 10, 2010 at 11:05 PM, jose isaias cabrera > wrote: >> >> Greetings. >> >> I would like some help with this scenario... DB name OpenJobs. >> >> id,pid,spid,notes >> 100, 24,32,'this is a tes

Re: [sqlite] Adding a string in front of what is already in a field

2010-10-11 Thread jose isaias cabrera
"P Kishor" wrote... > José, > > Please note Igor's very important cautionary note below -- > > On Mon, Oct 11, 2010 at 7:05 AM, Igor Tandetnik > wrote: >> P Kishor wrote: >>> UPDATE OpenJobs >>> SET notes = 'string to add in front\r\n' || notes >>> WHERE spid = 32; >> >> Note that SQLite doesn'

Re: [sqlite] Adding a string in front of what is already in a field

2010-10-12 Thread jose isaias cabrera
"P Kishor" wrote... > José, > > Please note Igor's very important cautionary note below -- > > On Mon, Oct 11, 2010 at 7:05 AM, Igor Tandetnik > wrote: >> P Kishor wrote: >>> UPDATE OpenJobs >>> SET notes = 'string to add in front\r\n' || notes >>> WHERE spid = 32; >> >> Note that SQLite doe

[sqlite] Changing Date Format

2010-10-26 Thread jose isaias cabrera
Greetings and salutations. I have this data entry problem, that I have placed a fix for the users, but I have entries in the DB that have the wrong date format. There are dates entered in this format, 2010-1-1 instead of 2010-01-01. Say that I had this table, table1. id,st,ca,d1,d2 1,AA,BB,

Re: [sqlite] Changing Date Format

2010-10-27 Thread jose isaias cabrera
"BareFeetWare" wrote... > On 27/10/2010, at 3:09 PM, jose isaias cabrera wrote: > >> I know I can do a bunch of sets, such as this one, >> >> UPDATE table1 set d1 = '2010-01-01' >> where >> d1 = '2010-1-1'; >> >&g

Re: [sqlite] Changing Date Format

2010-10-27 Thread jose isaias cabrera
"Max Vlasov" wrote... > On Wed, Oct 27, 2010 at 8:09 AM, jose isaias cabrera > wrote: > >> >> What I would like to do is a call that can fix the dates to the correct >> format, ie. -MM-DD, so that the final data looks like this, >> >> > H

[sqlite] Better way to get records by IDs

2011-05-20 Thread jose isaias cabrera
Greetings. I would like to get a bunch of records of IDs that I already know. For example, this table called Jobs, rec,...,data,... 1,...,aaa,... 2,...,zzz,... ... ... 99,...,azz,... I know I can do this call, begin; select * from Jobs where rec=1; select * from Jobs where rec=2; end; and tha

Re: [sqlite] Better way to get records by IDs

2011-05-20 Thread jose isaias cabrera
"Martin Engelschalk", on Friday, May 20, 2011 9:04 AM wrote... > Hi, > > you want this: > > select * from Jobs where rec in (1, 2) > > Martin Darn it! Thanks. And that is easier... :-) > Am 20.05.2011 15:00, schrieb jose isaias cabrera: >> Greetin

Re: [sqlite] Better way to get records by IDs

2011-05-20 Thread jose isaias cabrera
"Oliver Peters" on Friday, May 20, 2011 9:47 AM wrote... > jose isaias cabrera writes: > >> >> >> Greetings. >> >> I would like to get a bunch of records of IDs that I already know. For >> example, this table called Job

Re: [sqlite] Better way to get records by IDs

2011-05-20 Thread jose isaias cabrera
then 1 > when 33 then 2 > when 37 then 3 > when 2 then 4 > when 1 then 5 > end; > > Martin Thanks, this will work. > > Am 20.05.2011 15:55, schrieb jose isaias cabrera: >> "Oliver Peters&

Re: [sqlite] Better way to get records by IDs

2011-05-23 Thread jose isaias cabrera
"BareFeetWare", on Saturday, May 21, 2011 9:15 PM wrote... > Hi Jose, > >> I would like to get a bunch of records of IDs that I already know. For >> example, this table called Jobs, >> rec,...,data,... >> 1,...,aaa,... >> 2,...,zzz,... >> ... >> ... >> 99,...,azz,... > > In addition to the pure

Re: [sqlite] Better way to get records by IDs

2011-05-24 Thread jose isaias cabrera
"BareFeetWare", on Tuesday, May 24, 2011 8:31 AM wrote... On 23/05/2011, at 11:13 PM, jose isaias cabrera wrote: SharedDB file is about 600 megs shared over a network drive and it's getting slow, but if I get the specific record ID only with the select that I want, it'

[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, b.

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

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

Re: [sqlite] Multiple SELECTs in one call

2019-02-07 Thread Jose Isaias Cabrera
about 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

[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] 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_201

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

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

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

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

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

Re: [sqlite] Checking differences in tables

2019-02-12 Thread Jose Isaias Cabrera
f aggregate function max() -Original Message- From: sqlite-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

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

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

[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, idate)

Re: [sqlite] Getting data from two JOIN tables

2019-02-27 Thread Jose Isaias Cabrera
ists.sqlite.org] 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

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
ists.sqlite.org] 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

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] 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: sqlite-

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 wr

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

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

Re: [sqlite] INSERTing from another table data

2019-03-19 Thread Jose Isaias Cabrera
know 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

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

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] Help with INDEXing a query

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

Re: [sqlite] Help 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

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

[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] Returning NULL or empty values when the SELECT does not satisfy all of the query

2019-04-05 Thread Jose Isaias Cabrera
lavin Sent: Friday, 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

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
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
M 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: > > Greetings. > > I have a few tables that I am bringing data from, but I found a bug in my > l

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

2019-04-05 Thread Jose Isaias Cabrera
L or empty 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 d

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

2019-04-08 Thread Jose Isaias Cabrera
f 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. > se

[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] .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.

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 http://mailinglists.sqlite.org/cgi-bin/mailman/li

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

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

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

2019-05-02 Thread Jose Isaias Cabrera
04:01 PM, wrote... To: SQLite mailing list Subject: Re: [sqlite] Getting the week of the month from strftime or date functions I think "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 th

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 P

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 > 2019-12-0

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

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, then you

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] 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 >https://www.sqlite

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 t

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 wan

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 http://mailing

[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',

<    1   2   3   4   5   6   7   >