title: How to search fields using Join?
body: <p>i have following columns:</p>
  
  <pre><code>Employee Name:
  
  Department:
  
  Designation:
  
                    Search Button
  </code></pre>
  
  <p>I wanted to write the Search query by joining tables.
  How will be the search query?</p>
  
  <p>I just want a search query using inner join.</p>
  
  <p>I tried the following:</p>
  
  <pre><code>select e.empname, d.depname,designation 
  from employee e  
  inner join Department d on e.deptid=d.deptid 
  inner join Designation de on de.deid=
  where empname LIKe '"+Textbox1.text+'%'"' 
     or depname Like '"+ddldept.SelectedValue+"' 
     or designation Like '"+ddldesignation.SelectedValue+"'
  </code></pre>
  
  <p>Please correct me if I am wrong.</p>