Subject: | join tables in update |
Date: | Thu, 23 Oct 2014 13:38:37 -0400 |
To: | bug-SQL-Abstract-More [...] rt.cpan.org |
From: | val <valkoles [...] gmail.com> |
Hi,
Documentation for 'update' statement support declares that first argument
should be a table. But update statement (in plain SQL world) can be used
for few joined tables. And as SQL::Abstract::More doesn't support such
feature (yet?) I have to use workaround like this:
my ( $stmt, @bind ) = $sql -> update( -table => $sql -> join( @join ) ->
{sql},
-set => { 't5.onhand' => \ [
't5.onhand + t4.partQty * ?' => - $qty_diff ],
},
-where => \%where,
);
If support of such feature wasn't dropped on purpose, can it be added to
'update' statements the way it's done for 'select' statements? At least it
would provide syntax consistency. And shouldn't break anything AFAIK.
With best regards,
Val