Re: [sqlite] SQL CASE WHEN THEN ELSE END

2020-01-26 Thread Keith Medcalf
Do you perhaps mean: SELECT a.a, a.c, a.e, b.g, b.h, b.i, coalesce(( SELECT 'YES' FROM t2 WHERE wYear == a.c AND pid == a.a ), 'NO') AS

Re: [sqlite] SQL CASE WHEN THEN ELSE END

2020-01-26 Thread Keith Medcalf
I get nothing at all except a complaint that the syntax is invalid. In particular ( CASE ( SELECT WYear FROM t2 WHERE pid = a.a ) WHEN c.WYear = 2020 THEN “YES” ELSE “NO” END ) AS DIGITAL Is not a valid scalar expression. Parsing fails at "WHEN". What exactly

Re: [sqlite] SQL CASE WHEN THEN ELSE END

2020-01-26 Thread Jose Isaias Cabrera
Igor Tandetnik, on Sunday, January 26, 2020 09:57 PM, wrote... > > On 1/26/2020 9:44 PM, Jose Isaias Cabrera wrote: > > CASE > > ( > >SELECT WYear FROM t2 WHERE pid = a.a > > ) > > WHEN c.WYear = 2020 THEN “YES” > > ELSE “NO” END > > ) AS DIGITAL > > This

Re: [sqlite] SQL CASE WHEN THEN ELSE END

2020-01-26 Thread Simon Slavin
On 27 Jan 2020, at 2:44am, Jose Isaias Cabrera wrote: > CASE >( > SELECT WYear FROM t2 WHERE pid = a.a >) >WHEN c.WYear = 2020 THEN “YES” >ELSE “NO” END That's not the structure of a CASE statement. After CASE comes an expression. After WHEN comes another expression.

Re: [sqlite] SQL CASE WHEN THEN ELSE END

2020-01-26 Thread Igor Tandetnik
On 1/26/2020 9:44 PM, Jose Isaias Cabrera wrote: CASE ( SELECT WYear FROM t2 WHERE pid = a.a ) WHEN c.WYear = 2020 THEN “YES” ELSE “NO” END ) AS DIGITAL This should probably be simply case c.WYear when 2020 then 'YES' else 'NO' end or equivalently case

[sqlite] SQL CASE WHEN THEN ELSE END

2020-01-26 Thread Jose Isaias Cabrera
Greetings! I am getting the wrong output, and I don't know how to get it to work. Please take a look at the following (Pardon the lengthy data): create table t0 (n INTEGER PRIMARY KEY, a, b, c, d, e, idate); insert into t0 (a, b, c, d, e, idate) values ('p001', 1, 2019, 'n', 4, '2019-02-11');

Re: [sqlite] importing data to a table that has generated-columns

2020-01-26 Thread Brian Curley
Is there a missed parsing on the input file? It's likely to be a bare word situation where an extra delimiter is encountered in the record. It's probably only on one record in particular, although I don't know if the error message reads that back. The shell is sensitive to these, as it's expected

Re: [sqlite] importing data to a table that has generated-columns

2020-01-26 Thread Keith Medcalf
On Sunday, 26 January, 2020 10:29, chiahui chen wrote: >After creating a table (total 8 columns including 1 generated column), I >tried to import data from a csv file (each record has values for 7 >columns that match the non-generated column names and data types, no >headers ). >The system

Re: [sqlite] importing data to a table that has generated-columns

2020-01-26 Thread Scott Robison
On Sun, Jan 26, 2020 at 11:01 AM chiahui chen wrote: > Hi, > > After creating a table (total 8 columns including 1 generated column) , I > tried to import data from a csv file (each record has values for 7 columns > that match the non-generated column names and data types, no headers ). > > The

[sqlite] importing data to a table that has generated-columns

2020-01-26 Thread chiahui chen
Hi, After creating a table (total 8 columns including 1 generated column) , I tried to import data from a csv file (each record has values for 7 columns that match the non-generated column names and data types, no headers ). The system issued " error: table has 7 columns but 8 values were

[sqlite] SQLite: A couple minor doc bugs

2020-01-26 Thread Sigmund, Andrew
To whom it may concern, A couple minor SQLite documentation bugs: https://sqlite.org/testing.html Section 7.1, in paragraph beginning "Branch coverage is more strict": Paragraph ends saying "three test cases", but only two are listed (first appears garbled).

Re: [sqlite] SSL: cannot connect to host www3.sqlite.org:443 (Connection refused)

2020-01-26 Thread Domingo Alvarez Duarte
Hello Richard ! I'm no getting this: sqlite3$ fossil update Autosync:  https://www3.sqlite.org/cgi/src server says: 500 Server Malfunction Pull done, sent: 1295  received: 217  ip: 64.225.41.2 Autosync failed. continue in spite of sync failure (y/N)? n update abandoned due to sync failure