|
-
Mar 16th, 2004, 03:46 AM
#1
Thread Starter
PowerPoster
SQL Statement - Inner Join problems
Hey All
Can anyone tell me whats wrong with this:
strSQL = "SELECT tbl_History.*, Employees.*, tbl_Vehicles.* FROM tbl_History INNER JOIN Employees ON (tbl_History.EID = Employees.Employee_ID) INNER JOIN tbl_Vehicles ON (tbl_history.VID = tbl_Vehicles.Vehicle) WHERE tbl_History.EID = " & eid & ""
It returns no records when there is a record it should be returning.
I have a feelign it's because of the WHERE statement.
What i want it to be doing is Joining the 3 tables.
Showing records that match the EID from the History table.
ideas
cheers
b
-
Mar 16th, 2004, 03:53 AM
#2
Hi,
You are definately sure that there are matching records in all tables?
Try taking out the where clause and see whether it returns the correct results, then see whether id you are sending matches correctly.
Last try would be to use left joins... 
Vince
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
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
|