[Dbix-class] Using update on a resultset with join
Matt S Trout
mst at shadowcat.co.uk
Thu May 6 20:35:31 GMT 2010
On Wed, May 05, 2010 at 12:24:18PM +0200, Peter Rabbitson wrote:
> > Whereas I was expecting SQL like:
> > UPDATE foo me JOIN ( bars bar ON bars.id = me.bar_id ) SET me.exported =
> > 1 WHERE ( me.exported = 0 AND bar.state = 'WA' )
> Newer versions address this issue, albeit not with the SQL you proposed
> (I am not aware of any RDBMS which will execute the above sanely - i.e.
> *really* restrict the update-able set with the join). In any case -
> simply upgrade.
It's called PostgreSQL. Here's a dollar, MySQL boy, get yourself a real
(though that's still completely the wrong syntax - see
for the actual SQL involved)
Matt S Trout - Shadowcat Systems - Perl consulting with a commit bit and a clue
Email me now on mst (at) shadowcat.co.uk and let's chat about how our Catalyst
commercial support, training and consultancy packages could help your team.
More information about the DBIx-Class