I paste the following query to VS report project:

="SELECT A.ID AS RECID, 0 AS SUBRECID, A.ID, A.PARENT_ID, A.STATUS, D.DESCRIPTION, " &
"A.INSTR_ID, A.QUANTITY, A.PRICE, A.TRADE_DATE, A.ACCT_ID, " &
"C.PRICE AS expr1, C.QUANTITY AS Expr2, B.NAME " &
"FROM [ORDER] AS A LEFT OUTER JOIN " &
"ACCT AS B ON A.ACCT_ID = B.ID LEFT OUTER JOIN " &
"EXECUTION AS C ON A.ID = C.ORDER_ID LEFT OUTER JOIN " &
"ORDER_STATE AS D ON D.CODE = A.STATUS " &
"WHERE (A.PARENT_ID IS NULL) " &
"UNION " &
"SELECT A.PARENT_ID AS RECID, A.ID AS SUBRECID, A.ID, A.PARENT_ID, A.STATUS, D.DESCRIPTION, " &
"A.INSTR_ID, A.QUANTITY, A.PRICE, A.TRADE_DATE, " &
"A.ACCT_ID, C.PRICE AS Expr1, C.QUANTITY AS Expr2, B.NAME " &
"FROM [ORDER] AS A LEFT OUTER JOIN " &
"ACCT AS B ON A.ACCT_ID = B.ID LEFT OUTER JOIN " &
"EXECUTION AS C ON A.ID = C.ORDER_ID LEFT OUTER JOIN " &
"ORDER_STATE AS D ON D.CODE = A.STATUS " &
"WHERE (A.PARENT_ID IS NOT NULL) " &
"ORDER BY A.TRADE_DATE, A.ACCT_ID, RECID, SUBRECID"

and get the following error when verifying the code:
Incorrect syntax near "=".

But the sql runs fine as a static statement as follows:
SELECT A.ID AS RECID, 0 AS SUBRECID, A.ID, A.PARENT_ID, A.STATUS, D.DESCRIPTION, A.INSTR_ID, A.QUANTITY, A.PRICE, A.TRADE_DATE, A.ACCT_ID,
C.PRICE AS Expr1, C.QUANTITY AS Expr2, B.NAME
FROM [ORDER] AS A LEFT OUTER JOIN
ACCT AS B ON A.ACCT_ID = B.ID LEFT OUTER JOIN
EXECUTION AS C ON A.ID = C.ORDER_ID LEFT OUTER JOIN
ORDER_STATE AS D ON D.CODE = A.STATUS
WHERE (A.PARENT_ID IS NULL)
UNION
SELECT A.PARENT_ID AS RECID, A.ID AS SUBRECID, A.ID, A.PARENT_ID, A.STATUS, D.DESCRIPTION, A.INSTR_ID, A.QUANTITY, A.PRICE, A.TRADE_DATE,
A.ACCT_ID, C.PRICE AS Expr1, C.QUANTITY AS Expr2, B.NAME
FROM [ORDER] AS A LEFT OUTER JOIN
ACCT AS B ON A.ACCT_ID = B.ID LEFT OUTER JOIN
EXECUTION AS C ON A.ID = C.ORDER_ID LEFT OUTER JOIN
ORDER_STATE AS D ON D.CODE = A.STATUS
WHERE (A.PARENT_ID IS NOT NULL)
ORDER BY A.TRADE_DATE, A.ACCT_ID, RECID, SUBRECID

I have no idea of what mistake I have made. Do anyone know or have similar experience?

Thanks a lot for your help.