Tuesday 15 April 2014

mysql - Error Code: 1221. Incorrect usage of UPDATE and ORDER BY -- When updating Table Abonnement -



mysql - Error Code: 1221. Incorrect usage of UPDATE and ORDER BY -- When updating Table Abonnement -

when trying update include cost in previous made table abonnement error code mentioned in title. looked around on net seems syntax correct?

set sql_safe_updates=0; delete abonnement; delete abonnementtype; insert abonnementtype(begindatum,einddatum,type) values("2013/1/1","2013/1/1","dagpas"); insert abonnement(betaald,abonnementtype_atypeid,fietstype_ftype,klant_klantid,code,wachtwoord) values(false,(select max(atypeid) abonnementtype),1,1,"test","test"); update abonnement bring together fietstype af on a.fietstype_ftype = af.ftype bring together abonnementtype @ on a.abonnementtype_atypeid = at.atypeid set a.prijs = af.prijs * (at.einddatum + at.begindatum) order abonnementid desc limit 1;

have tried using with object? updatesyn ( ... ) update updatesyn set ... sql server: update table using order by

mysql sql-update

No comments:

Post a Comment