Posted - 07/19/2012 : 03:35:45
| I know how to join (I think I need inner join)
But I dunno how to add where condition to it (if needed)
Basically I need to get a field from table2 which is the result of a condition of field from table 1 and another field from table2.
And I need other field to simply b displayed as well.
I will give an example of the fields I need only.
ID<----should this is lesson_id , it is the pk of this table
Lesson_name <---this is what I want to b displayed eventually.
So waht I want is to display grades,grade_date as is and to display
Lesson name, where Grade.Lesson_ID=Lesson_ID.
I tried this:
SELECT [Grade_date], [Grade_grade] , [Lesson_name] , [Lesson_name] FROM [grade] INNER JOIN [Lesson] ON [grade.Lesson_ID=Lesson.ID]
Didn;t work though :S