Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
2 tables to get one
Message
From
08/09/2006 16:54:49
 
 
To
08/09/2006 16:22:20
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01152459
Message ID:
01152464
Views:
25
>Hi all,
>
>I have 2 tables ( table1 and table2) to become 1 single tableFinal but the structure is incremented .
>
>table1.dbf ( 2 fields )
>
>empno grade1
>11111 10
>22222 20
>33333 30
>
>table2.dbf ( 2 fields )
>
>empno grade2
>11111 11
>22222 22
>33333 33
>
>How to create SQL statment in order to have tableFinal like this ?
>
>TableFinal ( now 3 fields ) always order by empno.
>
>empno grade1 grade2
>11111 10 11
>22222 20 22
>33333 30 33
>
>Thank you in advance for helping me out.

You can use this:
SELECT table1.empno, grade1, grade2 FROM table1,table2 WHERE table1.empno = table2.empno ORDER BY table1.empno
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform