Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ugly SQL
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00563216
Message ID:
00563221
Views:
21
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform