rs.Open "SELECT subjectcode.Year1, subjectcode.Year2, subjectcode.Subjectcode, subjectcode.Subjectname, subjectcode.Theory_Practical FROM subjectcode where subjectcode.Degree='" & Degree & "' and subjectcode.Branch='" & course & "' and subjectcode.Year1='" & year1 & "' and subjectcode.Year2='" & year2 & "' and subjectcode.Semester='" & semester1 & "' , q.Fee INNER JOIN ( SELECT fees.Year1, fees.Year2, 'Theory' As FeeType, fees.Theoryfee As Fee FROM fees UNION ALL SELECT fees.Year1, fees.Year2, 'Practical' As FeeType, fees.Practicalfee As Fee FROM fees) AS q ON (subjectcode.Theory_Practical = q.FeeType) AND (subjectcode.Year2 = q.Year2) AND (subjectcode.Year1 = q.Year1)", con, 1, 3
It shows "missing operator" error and i think the error is near "q.Fee" and i don't know how to use that in that place and so i give the heading and sample value of those above tables below (Note : In the above where condition in rs statement contains values as degree,course like that and these are the labels name and you can see that in the screentshot here http://tinypic.com/v...pic=2gwtdaq&s=6 )
Subjectcode table :
Heading(Degree,Branch,Year1,Year2,Semester,Subjectcode,Subjectname,Theory_Practical,Major_Allied_Elective) values (Bsc,computer science,2001,2003,2,RCCS10CS1,C language,Theory,Major)
Fees table :
Heading(Year1,Year2,Theoryfee,Practicalfee) values (2001,2003,440,320)
I don't where to place that where condition and q.Fee in a correct order and please help me with this ! Thanks in advance !