title: Crystal Reports If Else in Database select SQL Command
body: <p>Im hoping to have have an if/else in my sql command within crystal 2013. The idea is something similar to this and I don't want to use stored procedures.</p>
  
  <pre><code>IF {?Search_Settings} = "This"
      THEN
      BEGIN (SELECT * FROM blah
             WHERE GETDATE() &lt; blah.date)
      END
  
  else if {?Search_Settings} = "That" 
      THEN
      BEGIN (SELECT * FROM blah
             WHERE GETDATE() &gt; blah.date)
      END
  </code></pre>
  
  <p>As mentioned I am looking to have this in the database expert > Modify Command Screen.</p>
  
  <p>Is this even possible? If not, what is the best option for achieving this? I appreciate your help with this.</p>