• murray-906152 (7/19/2011)


    I think that this question is ambiguous and should be withdrawn.

    There is NO query returning zero rows in the question.

    There is one insert statement yielding five rows affected.

    You might have missed the extra UNION ALL but others will just see it as it is and think it is a question about attempting to reference rows yet to be inserted.

    Regards, Murray.

    I fully agree with this statement.

    I didn't miss the fact that UNION ALL was before the select, so thought that the question was about the 5 rows that were affected, instead of returned.

    But if that is not the case then the answer should be "There is NO query returning rows."