Clarification of previous question

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!!!
 
M

Marshall Barton

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top