Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with a View.
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00147107
Message ID:
00147140
Views:
26
Yep - that's one of the little quirks about the view designer - I've had the same problem when trying to use more than two tables. The trick is not to use the view designer and create it manually and use the Create View command. The SQL statement has some things in the wrong order. It MAYBE should look like

SELECT Payment.*, Instructor.*;
FROM ls!payment LEFT OUTER JOIN ls!instructor;
ON Payment.pay_inst = Instructor.ins_inst;
INNER JOIN ls!customer ;
ON Payment.pay_acct = Customer.cus_acct

or something to that effect. Anyway, I am sure that something is simply out of order in the SQL statement - you may have to play around with it to get it to work.

>Hi,
>
>I am pretty new to views and I am having a problem building a view with three tables. The three tables are Payments, Customer, and Instructor. I would like a view that lists every payment and includes Customer and Instructor information. I go into the view designer and add the payment table and then the customer file the relation I create is a left join with payment.pay_acct = customer.cus_acct. I then add the instructor table with a left join on payment.pay_inst = instructor.ins_inst. The resulting sql statement follows:
>
>
>SELECT Payment.*, Instructor.*;
> FROM  ls!payment LEFT OUTER JOIN ls!instructor;
>    INNER JOIN ls!customer ;
>   ON  Payment.pay_acct = Customer.cus_acct ;
>   ON  Payment.pay_inst = Instructor.ins_inst
>
>
>However when I try to save the view I get an error "SQL: Column 'Pay_Acct' is not found."
>
>Thanks,
>
>Paul
ICQ 10556 (ya), 254117
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform