|
-
Dec 29th, 1999, 05:36 PM
#1
Thread Starter
Addicted Member
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"
-
Dec 29th, 1999, 05:43 PM
#2
Frenzied Member
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
-
Dec 29th, 1999, 05:50 PM
#3
Thread Starter
Addicted Member
Thanks Alot Mark
------------------
OmarSwan
[email protected]
http://omarswan.da.ru/
"Jesus is Lord"
-
Dec 29th, 1999, 10:20 PM
#4
Guru
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.
-
Dec 30th, 1999, 03:24 AM
#5
Frenzied Member
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)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|