Hi Vikram,
If the query is working in Dev, but not QA, Consider recollecting all required objects for query in the transport collector. be sure to verify the that ALL query elements have a package assigned.
If some are missing, assign and re-transtort.
Good luck,
John Hawk