> This sucession of queries give me "SQLite error no such column: > tmp_ProporcionesGrupos.GRUPO" > > UPDATE ResRdosGrupo SET > ResRdosGrupo.PROPORCION = > ( SELECT > tmp_ProporcionesGrupos.PROPORCION > FROM tmp_ProporcionesGrupos > ) > WHERE > ResRdosGrupo.GRUPO = tmp_ProporcionesGrupos.GRUPO AND ResRdosGrupo.CLASE > = "A" AND ResRdosGrupo.TOTAL = FALSE;
There's no table tmp_ProporcionesGrupos in the WHERE scope of UPDATE statement above. Probably you wanted to write something like this: UPDATE ResRdosGrupo SET PROPORCION = ( SELECT tmp_ProporcionesGrupos.PROPORCION FROM tmp_ProporcionesGrupos WHERE ResRdosGrupo.GRUPO = tmp_ProporcionesGrupos.GRUPO ) WHERE CLASE = "A" AND TOTAL = FALSE; Pavel On Wed, Dec 28, 2011 at 12:29 PM, Esteban Cervetto <[email protected]> wrote: > This sucession of queries give me "SQLite error no such column: > tmp_ProporcionesGrupos.GRUPO" > > Can anyone help me? > > CREATE TABLE tmp_ProporcionesGrupos > ( > GRUPO integer, > PROPORCION real > ); > > > > INSERT INTO tmp_ProporcionesGrupos > ( > grupo, > proporcion > ) > > SELECT > t.grupo_post, > SUM(prob_tr)/ (SELECT > SUM(prob_tr) > FROM partransiciones t1 > INNER JOIN datsiniestros s1 ON > (t1.grupo = s1.grupo AND t1.clase = s1.clase AND t.delay = > s.delay)) > FROM partransiciones t > INNER JOIN datsiniestros s ON > (t.grupo = s.grupo AND t.clase = s.clase AND t.delay = s.delay) > GROUP BY > t.grupo_post > ORDER BY > t.grupo_post; > > > UPDATE ResRdosGrupo SET > ResRdosGrupo.PROPORCION = > ( SELECT > tmp_ProporcionesGrupos.PROPORCION > FROM tmp_ProporcionesGrupos > ) > WHERE > ResRdosGrupo.GRUPO = tmp_ProporcionesGrupos.GRUPO AND ResRdosGrupo.CLASE > = "A" AND ResRdosGrupo.TOTAL = FALSE; > > > DROP TABLE tmp_ProporcionesGrupos; > _______________________________________________ > sqlite-users mailing list > [email protected] > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

