how to write a dynamic query for joining specified tables?
Table relations are
Department table have empid foreign key->employee table have id primary key
Employeelicences table have empid foreign key
for Example :
Employee table is join to department and Employeelicences is join to employee table
if we pass in where cause Employee and department
tables
employee table and department table will be joined
but i am getting employeelicences table also joining
how to fix this problem
can you please help me