Visualizzazione dei risultati da 1 a 2 su 2

Discussione: [sql] errore!!

  1. #1

    [sql] errore!!

    dunque, ho la seguente query SQL di aggiornamento..

    UPDATE fatture SET Data_Fatt = '2008-04-16',
    SET Num_Fatt = '1-08',
    SET ID_Cli =3,
    SET Lavoro = 'dssdfsdf',
    SET CodArt1 =123,
    SET Descr1 = 'sdfsdfsdfsd',
    SET Qta1 =2,
    SET PrezzoUni1 = 12.34,
    SET Sconto1 =5,
    SET Importo1 = 19.74,
    SET CodArt2 =234,
    SET Descr2 = 'dvccxvv bbb',
    SET Qta2 =5,
    SET PrezzoUni2 = 123.45,
    SET Sconto2 =8,
    SET Importo2 = 540.09,
    SET Materiali = 'fgghfghdfhfg',
    SET Costo_Mat = 716.63,
    SET Costo_Mat_Ricambi = 1276.46,
    SET Manodopera =50,
    SET Costo_Mano = 12.12,
    SET Tot_Mano = 1165.83,
    SET Imponibile = 1165.83,
    SET TotIVA = 58.29,
    SET TotFatt = 1224.12 WHERE ID_Fatt =5

    mi da un errore

    #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET Num_Fatt='1-08', SET ID_Cli=3, SET Lavoro='dssdfsdf', SET CodArt1=123, SET D' at line 1

    cavolo ma sembra tutto corretto!!!! dove cavolo è l'errore di sintassi????

  2. #2
    aaaahhh trovato...la parola chiave SET dovevo metterla solo sul primo campo della lista, negli altri non ce ne è bisogno..

    http://dev.mysql.com/doc/refman/5.0/en/update.html

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.