-
What would be the correct SQL syntax for the following:
example : I have two tabeles
1. Baset_Ball_Players
2. Students
in the table Baset_Ball_Players there is a field called Player_Name and in Students there is a field called Student_Name.
How could I do a search to find all the matches where Player_Name = Student_Name.
Just like finding the Names that are similar in the two tables.
Another question, is this possible with two seperate database files??
------------------
OmarSwan
[email protected]
http://omarswan.da.ru/
"Jesus is Lord"
-
Like this:
SELECT Baset_Ball_Players.Name
FROM Baset_Ball_Players INNER JOIN Students ON Baset_Ball_Players.Name = Students.Name;
Not sure about using 2 databases
What you could do though is put a link in one database to the 2nd one and then treat it as one database.
------------------
Mark Sreeves
Analyst Programmer
[email protected]
A BMW Group Company
-
Thanks Alot Mark
------------------
OmarSwan
[email protected]
http://omarswan.da.ru/
"Jesus is Lord"
-
For two separate database tables, I believe you will have to use the ADO SHAPE command to relate tables that are not in the same database.
-
Depending on the size of your tables and what you want to find, it might be more efficient to use a sub-query.
such as
SELECT Name
FROM Baset_Ball_Players
where Name in (select distinct(Name) from students)