hi i am trying to inner join three tables, after googling some times i found some codes and i tried it resulting some error, here is my querySELECT s.staffid,s.staffname,t.ddate,t.intime,t.outtime,t.status,t.hrs,t.totlatetime,t.totearlydep from test t inner join staffappointment s on (t.empid=s.staffid) inner join dept_master d on (d.departmentcd=s.department) where t.edate='20061004';
here is the errorSyntax error missing operator in query expression(t.empid=s.staffid) inner join dept_master d on (d.departmentcd=s.department)
here is the tables involved and its structuretable name staffappointmentfields staffid varchar(10),staffname varchar(50),department int,desig varchar(50)table name testfields empid varchar(10),ddate varchar(10),intime int,outtime int,status varchar(10),hrs int,totlatetime int,totearlydep int,edate varchar(10)table name dept_masterfields departmentcd int,departmentname varchar(50)
if i use where conditions to join then it works fine that query isSELECT s.staffid,s.staffname,d.departmentname,t.ddate,t.intime,t.outtime,t.status,t.hrs,t.totlatetime,t.totearlydep from test t,staffappointment s,dept_master d where (t.empid=s.staffid) and (d.departmentcd=s.department) and t.edate='20061004'
where i am missing in inner join.@peso sir, how to provide sample data for you guys to work around