This message serves for Google indexing. It only includes the first message of each thread from technical forums. To see the entire thread, the solutions and the technical content related to each message, you need to log in by going to the main page. This can be done at http://www.universalthread.com. If you do not have an account, we encourage you to create one now and start participating in Microsoft .NET and SQL Server related technology forums, just to name a few. Our database contains nearly two millions valuable high end technical messages. Thanks for the generous contribution to everyone who participated on the site so far, including MVP, Microsoft employees and many other well known contributors. The valuable content of the Universal Thread has created a history of 16 years of high end technical content which has helped many consultants, developers and many others in the industry on a daily basis. The site also offers a subscription option that greatly enhances your site experience.


View message
From08/07/1997 12:18:25
Jeffery Cotton #013312
Berdy Medical Systems
Rochelle Park, New Jersey, United States
To  
All


We have set up a VFP database on a remote server and want to use remote views to access data there (our main reason is that in the future, if we have to access a SQL (or whatever) server, we only have to redesign the views and not rewrite any code).

Some very weird things are happening, however. When I establish the connection and then try to create a new remote view, I am presented with the dialog that asks me to create a JOIN between the two tables I've added to the view. So far so good. But the JOIN statement doesn't go into the JOIN screen, it goes into the FILTER screen! If I delete it and try to create the join by drag-and-drop, it STILL goes into the FILTER screen. If I try to create the join manually in the JOIN screen, I get an ODBC error.

What I'm trying to do is create a left outer join between my "MainPatient" table and the "SCDirectory" table, which stores the names of the patients' attending physicians. I simmply want a list of all patients with their physician's name. When I look at the SQL code that my join statement generates, however, it looks VERY strange, and in fact generates an "unrecognized phrase/keyword" error on the "from" statement.

SELECT Mainpatient.firstname, Mainpatient.lastname,;
Scdirectory.firstname, Scdirectory.lastname;
FROM {oj mainpatient Mainpatient LEFT OUTER JOIN SCdirectory Scdirectory ;
ON Mainpatient.attendingmd = Scdirectory.dirid }


If I generate this same join as a LOCAL view, it works fine, and the code looks more like what I'd expect:

SELECT Mainpatient.fc_firstname, Mainpatient.fc_lastname,;
Scdirectory.fc_firstname, Scdirectory.fc_lastname;
FROM general!mainpatient LEFT OUTER JOIN general!SCdirectory ;
ON Mainpatient.fn_attendingmd = Scdirectory.fn_dirid

Since the SQL code generated in views is not editable, I'm stuck! I'd appreciate any guidance!!!

Thanks,

Jeffery Cotton
JVCotton@aol.com
Jeffery Cotton
Berdy Medical Systems
JVCotton@bellatlantic.net