General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Cannot save view created in view designer
I'm using VFP 6.0
I have a household table that has a state_id field and a city_id that are related into the states table, and city table respectively.
When i create a local view by using the view designer, it works great, but when i try to save it, I get a message "SQL: column city_id is not found", I can save this view, but cannot there after edit it. If I take off one or the other related tables (either city or states table) , all's ok. This is the SQL that it generates:
SELECT DISTINCT *;
FROM gems!household INNER JOIN gems!states;
INNER JOIN gems!city ;
ON Household.city_id = City.city_id ;
ON Household.state_id = States.state_id;
ORDER BY Household.household_id
So I tried taking off the joins and creating filters, in which case it generates "where" clauses and alls ok and i can save this.... but this not does not let me take advantage of the diff joins, if i needed to.
SELECT DISTINCT *;
FROM gems!household, gems!city, gems!states;
WHERE Household.state_id = States.state_id;
AND Household.city_id = City.city_id;
ORDER BY Household.household_id
Now, I can write these SQLs and save them, but why can't I does it not work via the view designer ???
can anyone help ?????
Thanks
Preston
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only