Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Search in different tables
Message
From
28/02/2012 13:04:23
 
 
To
28/02/2012 06:31:59
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01536630
Message ID:
01536718
Views:
37
>Hello Naomi
>I have three tables each one has a field similar to other as an example.
>table no 1I have a three fields
>1- studentid "0001"
>2- subject " Geography"
>3- teacher name XXXXXX
>4 grade 9
>
>on the second table I have the same things
>studentid 00002
>subject "History"
>teacher name XXXXXX
>grade 9
>on the third
>table no 2 also the same
>Table no 3
>studentid 00002
>subject "Civics"
>teacher name XXXXXX
>grade 11
>
>I am searching in these table to know how many subject for example Mr. X is teaching and what grades,
>Thank you
lcTeacher = 'Some name'
Select table1.subject,table1.grade from table1 where table1.teacher=lcTeacher;
union all;
Select table2.subject,table2.grade from table2 where table2.teacher=lcTeacher;
union all;
Select table3.subject,table3.grade from table3 where table3.teacher=lcTeacher
Previous
Reply
Map
View

Click here to load this message in the networking platform