title: Incorrect syntax near the keyword UNION
body: <p>Can anyone tell me what wrong I have written in the following query so that this error message is being shown.</p>
  
  <pre><code>strSelectQuery = "SELECT LED_ID AS PK_ID, FIRST_NAME + ' ' + LAST_NAME AS NAME"
                          + " FROM M_LEADERLED INNER JOIN M_USER_DETAILS"
                          + " ON M_LEADERLED.LED_ID = M_USER_DETAILS.PK_ID"
                          + " WHERE (M_LEADERLED.LEADER_ID = " + Session["UserID"].ToString() + ""
                          + " AND M_USER_DETAILS.ACTIVE = 1 AND M_LEADERLED.START_DATE &lt;= Getdate()"
                          + " AND M_LEADERLED.END_DATE &gt; Getdate())"
                          + " UNION SELECT PK_ID, FIRST_NAME + ' ' + LAST_NAME AS NAME"
                          + " FROM M_USER_DETAILS WHERE PK_ID = " + Session["UserID"].ToString() + ";";
  </code></pre>