Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Left outer join & table adapter, using vfpoledb 9 driver
Message
 
 
À
01/08/2007 13:03:42
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro et .NET
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01245186
Message ID:
01245190
Vues:
34
I think you overcomplicated the query with derived tables. the following query should return the same result
SELECT tleft.modeloptionid, tleft.weboptionimg, tright.modeloptionid, tright.orderdetailid
FROM modeloption tleft
LEFT JOIN orderoption tright 
	ON tleft.modeloptionid = tright.modeloptionid
		AND tright.orderdetailid = 41367
WHERE tleft.modelid = 2072
>
>I am unable to create a functioning Command on my datatableadapter for the following query in visual studio's dataset designer:
>SELECT tleft.modeloptionid, tleft.weboptionimg, tright.modeloptionid, tright.orderdetailid
>FROM
>	(SELECT modeloption.modeloptionid, modeloption.weboptionimg
>     FROM modeloption
>     WHERE modeloption.modelid = 2072) AS tleft
>LEFT OUTER JOIN
>    		(SELECT orderoption.modeloptionid, orderoption.orderdetailid
>             FROM orderoption
>             WHERE(orderoption.orderdetailid = 41367)) AS tright
>        ON tleft.modeloptionid = tright.modeloptionid
>The syntax is recognized and parsed by visual studio, but then visual studio automatically converts the sql text to the following code, which is not understood by the vfpoledb driver:
>SELECT     tleft.modeloptionid, tleft.weboptionimg, tright.modeloptionid AS Expr1, tright.orderdetailid
>FROM         { oj
>                          (SELECT     modeloptionid, weboptionimg
>                            FROM          modeloption
>                            WHERE      (modelid = 2072)) tleft LEFT OUTER JOIN
>                          (SELECT     modeloptionid, orderdetailid
>                            FROM          orderoption
>                            WHERE      (orderdetailid = 41367)) tright ON tleft.modeloptionid = tright.modeloptionid }
>Can somebody offer some suggestions on how to get this query into a command on my datatableadapter? Thanks!
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform