Clarification of previous question

  • Thread starter Thread starter CJ
  • Start date Start date
C

CJ

Hi!

Regarding this statement:

sSQL = "SELECT * FROM ScheduleDetails WHERE fkScheduleID =
1"

fkScheduleID is a lookup field, its SQL is: SELECT
[Schedule].[ScheduleID], [Schedule].[fkRidesID],
[Schedule].[ScheduleDay] FROM Schedule;

What is the proper syntax that will get only the records
from ScheduleDetails WHERE the [Schedule].[fkRidesID]
value of fkScheduleID is equal to 1

Thank you in advance for you help!!!
 
CJ said:
Regarding this statement:

sSQL = "SELECT * FROM ScheduleDetails WHERE fkScheduleID =
1"

fkScheduleID is a lookup field, its SQL is: SELECT
[Schedule].[ScheduleID], [Schedule].[fkRidesID],
[Schedule].[ScheduleDay] FROM Schedule;

What is the proper syntax that will get only the records
from ScheduleDetails WHERE the [Schedule].[fkRidesID]
value of fkScheduleID is equal to 1


Another reason I can't stand those flippin lookup fields
;-)


You need to join the two tables so you can look at the
fields in Schedule.

SELECT ScheduleDetails.*
FROM ScheduleDetails INNER JOIN Schedule
ON Schedule.ScheduleID = ScheduleDetails.fkScheduleID
WHERE ScheduleDetails.fkRidesID = 1
 
Back
Top