Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using two fields to one table in a database view
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00593612
Message ID:
00593629
Views:
18
This message has been marked as the solution to the initial question of the thread.
You have to add the same table twice. Or do it programmatically so you can alias the tables the way you want:

FROM Mytable A JOIN MyTable B on A.Request_ID = B.Employe_ID

>A question about the view designer. How do you create an alias so that two fields in the parent table, request_id and employe_id , can be linked to one table? For example:
>vsWorkOrder (view)
>Workorder!Workord.request_id-------|--------> Workorder!employee.employe_id
>Workorder!Workord.employe_id-------|
>
>What the view designers does automatically is that it creates a relationship between workorder!workord.request_id -> Workorder!employee.employe_id and then it creates workorder!workord.employe_id -> Workorder!employe_a.employe_id. This second relationship creates an error when I attempt to view the data.
>
>What I want to do is to be able to define the table Employee with two aliases WoEmployee and WoEmpReq. Then I want to be able to link these two aliases rather than using the native table name - Employee.
>
>Any help would be greatly appreciated.
>
>
>Jim Smith
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform