cant you do something like this? update tTmp set tTmp.fileName = hTmp.fileName from t tTmp inner join h hTmp on t.id = h.id
1 maj 2010 kl. 14.20 skrev wdl...@web.de: > The general problem with this issue is that it is not possible > > to set an alias for the table in an update statement. > That should be implemented because otherwise some necessary > statements are not possible. > > e.g. > > update T x > set x.col1 = ( select sum(c) from T y where y.id = x.id ) > > Table T has the alias x in the outer update an the alias y in the > inner select. > > This is not possible. > Has someone an idea for a workaround ? > > Simon > > > -----Ursprüngliche Nachricht----- > Von: Pavel Ivanov <paiva...@gmail.com> > Gesendet: 30.04.2010 21:38:54 > An: General Discussion of SQLite Database <sqlite-users@sqlite.org> > Betreff: Re: [sqlite] sqlite update with joins > > You could try > > UPDATE H SET filename = (select F.rowid from F where F.filename = > H.filename); > > > Pavel > > On Fri, Apr 30, 2010 at 3:25 PM, David Lyon <david_ly...@yahoo.com> > wrote: >> I know sqlite update with joins is not supported but I have heard >> work arounds without the need for scripting. >> >> eg: >> 2 tables H and F both join on FILENAME >> I want to update h.FILENAME so its the same as the rowid of table F >> >> >> sqlite3 F "update H h , F f set h.FILENAME=f.rowid where >> h.FILENAME=f.FILENAME " >> >> is there an easy work around before I embark on scripting this >> >> >> Thanks Again >> >> >> >> >> _______________________________________________ >> sqlite-users mailing list >> sqlite-users@sqlite.org >> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users >> > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > ___________________________________________________________ > GRATIS: Movie-Flat mit über 300 Top-Videos. Für WEB.DE Nutzer > dauerhaft kostenlos! Jetzt freischalten unter http://movieflat.web.de > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users