1 pièce(s) jointe(s)
Erreur dans une commande SQL
Bonjour,
Delphi 7
SQBD : TurboDB
j'ai deux tables :
Projet (ID_Projet, Intitule_prj, num_prj)
Avenant ( id_avenant, num_avenant, montant_total, montant_part_mtm, date_signature, id_projet)
Je veux que mon DBGRID m'affiche les champs suivants :
[num_avenant / montant_total /date_signature / Intitule_prj]
J'ai ecrit ce code SQL :
Code:
1 2 3 4 5 6 7 8 9 10 11
| SQLAvenant.SQL.Clear;
SQLAvenant.SQL.Add('SELECT');
SQLAvenant.SQL.Add(' a.num_avenant, a.date_signature, a.montant_total, a.montant_part_mtm, p.Intitule_prj,');
SQLAvenant.SQL.Add(' FROM avenant a');
SQLAvenant.SQL.Add(' LEFT JOIN projet p ON a.id_projet = p.ID_Projet');
SQLAvenant.SQL.Add(' WHERE 1 = 1');
SQLAvenant.SQL.Add(' ORDER BY num_avenant ');
// 2 Préparation
SQLAvenant.Prepare;
//-------------
SQLAvenant.Open; |
Mais je reçois ce message d'erreur:
Pièce jointe 251331
Quelqu'un peut m'aider SVP.
Merci