[sqlite] How to update plural rows from one table to another.

2019-11-15 Thread Gan Uesli Starling
In the following update query, I had expected for the integer values "rowid" from the table "info" to project copies of themselves singly and separately into the integer cells "info_id" of table "qso", row-by-row, where the timestamps "t_from" of each are matching. UPDATE qso SET info_id = (  

Re: [sqlite] Simplify multiple use of value in a trigger

2017-01-08 Thread Gan Uesli Starling
Okay, this trigger what works. Not really an answer, since there's no simplification achieved. Still thought I'd post it though, as a conclusion-of-sorts nonetheless. It's neither clever nor elegant, but it does work. Hammer and tongs, is what it is. There's no decision tree for choosing when

Re: [sqlite] Simplify multiple use of value in a trigger

2017-01-07 Thread Gan Uesli Starling
Okay. Thank you everyone for the suggestions given thus far. I am SQLite version 3.15.2 if that's of import. Know all that the whole database project is on-line here: ky8d.net/sql As for the suggestion to 'normalize' my four tables to one ... yes, I could do that ... but it would make for a L

[sqlite] Simplify multiple use of value in a trigger

2017-01-07 Thread Gan Uesli Starling
So I'm trying to accumulate data for state/prov inside of USA, Canada and Mexico, and country for the rest of the world. Since country and state from the same update are factors in incrementing each of four tables, I was hoping to simplify it with a single select with 'AS' and then re-use the