new-grid adapt2 revision

parent f2c54969
......@@ -35,16 +35,16 @@ WHERE
attributes->>"$.coord_y" > 0;
INSERT INTO grid (name, id, id_stu)
SELECT picto_exp.text, stu_picto.id_child_grid, stu_picto.id_stu
FROM stu_picto, picto_exp
WHERE
stu_picto.id_child_grid IS NOT NULL AND
stu_picto.id_pic = picto_exp.id_pic AND
picto_exp.lang = 'es-es'
LIMIT 1;
-- NOTA: LIMIT 1 es para los casos en los que tenemos varias expresiones para
-- el mismo picto en el mismo idioma
SELECT pe.text, sp.id_child_grid, sp.id_stu
FROM stu_picto sp JOIN picto_exp pe ON
sp.id_child_grid IS NOT NULL AND
pe.id = (
SELECT pe2.id FROM picto_exp pe2
WHERE
pe2.id_pic = sp.id_pic AND
pe2.lang = "es-es"
LIMIT 1
);
-- Pictos hijos: los asociamos a su escena correspondiente
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment