I'm trying to create an update command to update the parent id but i keep getting an error from sqlite, here is my query. Can anyone help?
update table as t1
set t1.parent = (select t2.code from table as t2
where t1.id = t2.id
and t2.level = 1)
where t1.level = 2
If I'm not very clear, please let me know.
Aucun commentaire:
Enregistrer un commentaire