HI,,
Please help me resolve this error.."All queries combined using a UNION, INTERSECT or EXCEPT operator must have an equal number of expressions in their target lists."
query:
Code:
sql = "SELECT EVENT_ID,EVENT_DATE,COMMENT FROM EVENTS WHERE CALL_ID=" & CallId & " UNION ALL SELECT A.USER_NAME from USERS A INNER JOIN EVENTS B ON A.USER_ID=B.USER_ID WHERE B.CALL_ID=" & CallId & ""
And am getting this error for the following query."Incorrect syntax near the keyword 'UNION'. "
query:
Code:
sql = "SELECT * FROM EVENTS WHERE CALL_ID=" & CallId & " ORDER BY EVENT_ID UNION ALL SELECT A.USER_NAME from USERS A INNER JOIN EVENTS B ON A.USER_ID=B.USER_ID WHERE B.CALL_ID=" & CallId & ""
Thanks...