MySQL Forums
Forum List  »  Spanish

Update y select no lo puedo hacer error 1242
Posted by: Diego Scocco
Date: December 21, 2013 08:51AM

set @haber=20;
UPDATE ctacte SET=(SELECT calculo FROM (SELECT if(importe>@haber,faltante+(importe-(importe-@haber))+(@haber:=0), @haber-(@haber:=@haber-(importe-faltante))) as calculo FORM ctacte WHERE codigo cliente=10 and codigo operacion=1) as calfal) WHERE codigo cliente=10 and codigo operacion=1

Me da error 1242

Options: ReplyQuote


Subject
Views
Written By
Posted
1846
December 13, 2013 10:18AM
950
December 13, 2013 10:56AM
1272
December 18, 2013 11:02AM
Update y select no lo puedo hacer error 1242
916
December 21, 2013 08:51AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.