title: Conditional Where clause alternate
body: <p>I am using xml to display the query result. I have one issue related to my query. Say in the customer table i have an data whose id is not a forigne key in any of the other tables, but still I want to display the data. i a, using left join for this. But the problem is with the other table conditions( Where clause  pr.fActive=1...) due to which the i am not able to display the data which is only there in customer table but not in other table. How it can be done     </p>
  
  <pre><code>&lt;Table&gt;customer cu&lt;/Table&gt;
            &lt;Joins&gt;
              left join customerprogramxref cuprxref on cu.ixcustomer=cuprxref.ixcustomer
              left join tblprogram  pr on cuprxref.ixprogram=pr.ixprogram
              left join programworkpackagexref prwpxref on pr.ixprogram= prwpxref.ixprogram
              left join workpackage wp on wp.ixworkpackage =prwpxref.ixworkpackage
              left join workpackageactivityxref wpactxref on              wpactxref.ixworkpackage=wp.ixworkpackage
              left join activity act on act.ixactivity=wpactxref.ixactivity
            &lt;/Joins&gt;
            &lt;WhereClause&gt;
              cu.fStatus=1 AND pr.fActive=1 AND pr.fDeleted=0 AND wp.fStatus=1 AND act.fStatus=1
            &lt;/WhereClause&gt;
  </code></pre>