title: BEGIN..END not working in Nested IF..ELSE
body: <p>I am confused with the BEGIN.. END in the nested IF..ELSE condition.
  For example, when I am trying to execute below mentioned query. It is 
  returning an error -- <strong>"Incorrect syntax near ElSE.."</strong></p>
  
  <pre><code>IF ( ISNULL(@tin,'')=''AND ISNULL(@prpr_ntwrk,'')&lt;&gt;'' )
  BEGIN
      IF (ISNULL(@prpr_ntwrk,'')='P')
      BEGIN
              -- CODE     
      END                         
      ELSE 
      BEGIN
              -- CODE
      END
  
  END
  </code></pre>
  
  <p>please suggest.</p>