Try to move
ON clause after related
JOIN.
SELECT Solde.stpsp, Solde.stvqp1, Livre.lnum,;
Livre.lnom, Livre.lnoma, Livre_a.lnum, Livre_a.lnom,Livre_a.lnoma;
FROM(lSolde) as Solde ;
LEFT OUTER JOIN (lLivre);
ON Solde.stpsp = Livre.lnum ;
LEFT OUTER JOIN (lLivre) Livre_a ;
ON Solde.stvqp1 = Livre_a.lnum ;
INTO CURSOR cGltaxe
>Hi All
>I try to run this query but I always get this error
>
>SQL: Column stvqp1 is not found
>
>I have made this query in the query designer and it work just fine
>I copy it in my code and replace the table name with lsolde and llivre
>
>lpath = Thisform.prppath && 'c:\Avantage Win\Ava01\
>
>lSolde = Thisform.prppath+"Solde.dbf'
>lLivre = Thisform.prppath+"Livre.dbf'
>
>SELECT Solde.stpsp,Solde.stvqp1,Livre.lnum,; Livre.lnom,Livre.lnoma,Livre_a.lnum, Livre_a.lnom,Livre_a.lnoma;
>FROM(lSolde) as Solde ;
>LEFT OUTER JOIN (lLivre);
>LEFT OUTER JOIN (llivre) Livre_a ;
>ON Solde.stvqp1 = Livre_a.lnum ;
>ON Solde.stpsp = Livre.lnum INTO CURSOR cGltaxe
>
>any tip's
--sb--