I have a problem in Sqlite and I am desperate since nothing works... I have a perfectly working join:
select hierarchies.workclass_g1 from adult join hierarchies
on adult.workclass=hierarchies.workclass;
Now I want the result of this join to be found in a table. Either by updating or adding or inserting or whatever, I just need to store this somewhere. None of the different queries that were supposed to work actually do work. Here the syntax worked without eror but only the very FIRSTvalue of the join is put into EVERY row:
update adult set test=(select hierarchies.workclass_g1
from adult join hierarchies on adult.workclass=hierarchies.workclass)
Same with insert into, only the first value is inserted:
insert into adult (test) select hierarchies.workclass_g1
from adult join hierarchies on adult.workclass=hierarchies.workclass
This syntax doesnt work (near "set": syntax error).
update adult join hierarchies on adult.workclass=hierarchies.workclass
set adult.test=hierarchies.workclass_g1
Same here (near "join": syntax error).
update adult set test=hierarchies_g1 join hiearchies
on adult.workclass=hierarchies.workclass
I think this is not too complex, there must just be something wrong with the syntax, I dont know. Any help is highly appreciated
Aucun commentaire:
Enregistrer un commentaire