Can anyone tell me what wrong I have written in the following query so that this error message is being shown.
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 <= Getdate()"
+ " AND M_LEADERLED.END_DATE > Getdate())"
+ " UNION SELECT PK_ID, FIRST_NAME + ' ' + LAST_NAME AS NAME"
+ " FROM M_USER_DETAILS WHERE PK_ID = " + Session["UserID"].ToString() + ";";