Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating a remote view that joins 3 tables. Having trouble
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
Creating a remote view that joins 3 tables. Having trouble
Divers
Thread ID:
00095690
Message ID:
00095690
Vues:
67
I am using VFP 5.0 as my client and SYBASE SQL Anywhere 5.5.04 as my ODBC data source.

I have an Inventory file that has foreign keys to Department and Brand records. I want to have in my view the names associated with these foreign keys so that the name can be displayed easily.

This is my statement to create the remote view:

create sql view v_inventory remote connection prototype as ;
SELECT StockInventory.INV_ScanCode,Brands.BRD_Name,;
Departments.DPT_Name;
FROM dba.StockInventory StockInventory ;
LEFT OUTER JOIN dba.Departments Departments ;
ON StockInventory.INV_DPT_FK = Departments.DPT_PK ;
LEFT OUTER JOIN dba.Brands Brands ;
ON Brands.BRD_PK = StockInventory.INV_BRD_FK

VFP looks as though it has created the view, but if you attempt to modify the view you get the message "SQL: Cannot locate table". Then when viewing the view the third table in the SELECT is not there. It does not matter how I arrange the joins it is always missing the third table.

The SELECT statement part of this statement works fine if I run it through SYBASE ISQL.

I do have an ODBC trace of this. The one interesting thing that I notice right away is that there is not a SELECT statement for third table. There is a SELECT statement that matches the one sent then there are SELECT statements for StockInventory and Departments in this case.

If anyone has any suggestions they sure would be appreciated.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform