Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Frustration: Add same table twice in a view joined on 2 diff
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Frustration: Add same table twice in a view joined on 2 diff
Divers
Thread ID:
00780110
Message ID:
00780110
Vues:
35
Hi all

I have a view lv_tInquiry. All fields updatable.
Add Table mAccounts, Inner Join tInquiry.iPartyID = mAccounts.iID

This in itself will work. Now...

Again Add Table mAccounts, Inner Join tInquiry.iAgentID = mAccounts_a.iID

This view though when modifying does not have any problem. But if you save it and want to reopen this view it wont open giving an error SQL: Column 'iAgentID' is not found.

I tried opening this view in ViewEditor I get the same messge with error no. 1806. The following is the SQL generate for this view:
SELECT TINQUIRY.*, ;
		MACCOUNTS.CNAME, ;
		MACCOUNTS.CCITY, ;
		MACCOUNTS_A.CNAME, ;
		MACCOUNTS_A.CCITY ;
	FROM VSO3!TINQUIRY INNER ;
		JOIN VSO3!MACCOUNTS INNER ;
		JOIN VSO3!MACCOUNTS MACCOUNTS_A ;
				ON TINQUIRY.IAGENTID = MACCOUNTS_A.IID ;
				ON TINQUIRY.IPARTYID = MACCOUNTS.IID ;
	ORDER BY TINQUIRY.DDT, TINQUIRY.CBK, TINQUIRY.INO
I have tried Left Outer Join and same results. Right Outer Join and Full Join wont work in my case atleast.

Please help. This is just the tip of the ice-burg where I want to call the same master table twice. I may also have to call, if not the same master, other master(s) in the view also.
Regards
Bhavbhuti
___________________________________________
Softwares for Indian Businesses at:
http://venussoftop.tripod.com
___________________________________________
venussoftop@gmail.com
___________________________________________
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform