title: Crystal Reports Using IF in SQL Expression Field
body: <p>I have just started using Crystal Reports and I am trying to set the value of a field to be value1, or value2 instead if that is null. I tried entering this in the text section in the SQL Expression Editor:</p>
  
  <pre><code>If IsNull({TABLE.Value1}) Then
  {NewField} = (select Value2
      from TABLE where ID = {TABLE.ID})
  Else
  {NewField} = (select Value1
      from TABLE where ID = {TABLE.ID})
  </code></pre>
  
  <p>But I get an error stating that:</p>
  
  <blockquote>
    <p>ORA-00923: FROM keyword not found where expected</p>
  </blockquote>
  
  <p>How can I get this to work please?</p>