General information
Category:
Coding, syntax & commands
>>I put 3 tables into the view designer, all related via the Order_ID field.
>>Selected some output fields, and set my conditions: Order not closed;
>>OrderItem not closed; Supplier 400. I ran the view with no problem. I saved the view with no problem.
>>
>>So why, when I try to close the View Designer does it complain that
>>"SQL: Column 'Order_ID' is not found" ????
>>
>>Below is the code the VD generated...
>>
>>SELECT Orders.order_id, Orders.last_name, Orders.first_name,;
>> Orders.mid_name, Orders.suffix, Orders.dob, Orders.ssn, Orders.race,;
>> Orders.gender, Orderitems.report_id, Orderitems.city, Orderitems.state,;
>> Orderitems.county, Orderitems.country, Location.type, Location.name,;
>> Location.address1, Location.address2, Location.city, Location.state,;
>> Location.zip, Location.county, Location.country;
>> FROM ofax!orders INNER JOIN ofax!orderitems;
>> INNER JOIN ofax!location ;
>> ON Orders.order_id = Location.order_id ;
>> ON Orders.order_id = Orderitems.order_id;
>> WHERE EMPTY(Orders.close_date) = .T.;
>> AND Orderitems.sup_id = 400;
>> AND EMPTY(Orderitems.closed) = .T.
>
>Richard, actually it is a bug in the View Designer, which doesn't like parallel joins fron one table to two others. But you can create your view programmatically like:
>
>CREATE SQL VIEW myView AS ;
>here goes your above SQL
>
>Don't open this view in the View Designer after that!
>
>HTH,
>
>Nick
-----------------
Nick,
You said it is a bug in the VD, which doesn't like parallel joins fron one table to two others.
What if I changed the FROM to be:
SELECT MyFields;
FROM ofax!orders INNER JOIN ofax!orderitems;
INNER JOIN ofax!location ;
ON Orderitems.order_id = Location.order_id ;
ON Orders.order_id = Orderitems.order_id;
WHERE EMPTY(Orders.close_date) = .T.;
AND Orderitems.sup_id = 400;
AND EMPTY(Orderitems.closed) = .T.
This way the tables would be in series insead of in parallel.
Would this normally have any side-effect that I should watch for?
Rick
Previous
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