Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to implement this SQL statement?
Message
From
07/08/2000 05:03:40
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
How to implement this SQL statement?
Miscellaneous
Thread ID:
00401748
Message ID:
00401748
Views:
50
Hi,
I have 3 tables as the following. I need to generate a report from this. How does the SQL statment look like?
TableName: Transaction
Field
TranNo          Date           Amount      UserID
0001            01/01/2000        200      000001
0002            02/02/2000        100      000002

TableName: ContraLog
Field
TranNo          Date             UserID
0001            02/01/2000       000001
0002            02/02/2000       000002

TableName: User
Field
UserID          UserName
000001          John
000002          Micheal

How the sql statment look like if I need to generate the report look as the following??

Report
Trans.TranNo  Trans.Date  Amount  UserName1  Contra.Date  UserName2

UserName1 = user name who match with Trans.UserID
UserName2 = user name who match with Trans.UserID
Thank you very much
I am not the most powerful man in this world.
I am not the worst man in this world either.
I just as same as all of you.
I still need to learn from my mistakes...
Next
Reply
Map
View

Click here to load this message in the networking platform