Bonjour

Le code
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
  RadicQuery.Sql.Clear;
  RadicQuery.Sql.Text := 'Insert Into "' + CurDir + 'Temp\TableRadicExpInd.Db" ' +
                         '(Radic, ExpInd) ' +
                         'Select Trim(Leading "0" from (SubString(Capakey from 7 for 4))) as Radic, ' +
                         'SubString(Capakey from 12 for 6) as ExpInd ' +
                         'From "' + CurDir + 'Temp\MergedCapa.Dbf"' +
                         'Where SubString(Capakey from 1 for 5) =  "' + CodeDiv + '" and ' +
                         'SubString(Capakey from 6 for 1) =  "' + Sect + '"';
  RadicQuery.Open;
génère l'erreur «Différence de type dans une expression».

Si j'exécute le «Select» sans «Insert into» pas de problème.
Et pourtant, il apparait que la table de destination contient bien les champs de type String «Radic» de longueur 4 et «ExpInd» de longueur 6.

Cela m'aiderait si quelqu'un pouvait me dire où se trouve mon erreur.

Merci d'avance