Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Ugly SQL
Message
 
 
À
02/10/2001 15:15:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00563216
Message ID:
00563221
Vues:
22
>This baby seems to fail:
>
>SELECT CONFIGFILES.*, ;
>		PARAMETERS.CNAME, ;
>		PARAMETERS_A.CNAME, ;
>		PARAMETERS_B.CNAME, ;
>		PARAMETERS_C.CNAME ;
>	FROM GULFSTREAM!CONFIGFILES ;
>		LEFT JOIN GULFSTREAM!PARAMETERS ;
>		LEFT JOIN GULFSTREAM!PARAMETERS PARAMETERS_A ;
>		LEFT JOIN GULFSTREAM!PARAMETERS PARAMETERS_B ;
>		LEFT JOIN GULFSTREAM!PARAMETERS PARAMETERS_C ;
>				ON CONFIGFILES.IREMOTEPARAM4 = PARAMETERS_C.IPARAMID ;
>				ON CONFIGFILES.IREMOTEPARAM3 = PARAMETERS_B.IPARAMID ;
>				ON CONFIGFILES.IREMOTEPARAM2 = PARAMETERS_A.IPARAMID ;
>				ON CONFIGFILES.IREMOTEPARAM1 = PARAMETERS.IPARAMID ;
>	WHERE CARTICLEID = ?VP_CARTICLEID
>
>This is a remote view that I coded with viewedit. It can't seem to find iremoteparam4, even though the field is in the database. Any clues as to what's going on?

What if you would use another aliases, say, pr1, pr2, pr3, etc.? Try this query in command window with parameters word changed to pr1, pr2, etc.

Also I would do join by join, e.g.

select * from tbl1 left join tbl2 on .. left join tbl3 on ...
etc.

So, my suggestion: try to code this SQL manually rather than in View Designer, which doesn't handle well multiple joins.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform