This project has moved and is read-only. For the latest updates, please go here.
0

Closed

Infinite loop

description

This query causes an infinite loop:

WITH MyEmployees AS (
    SELECT  TOP 5 WITH TIES
            D.FullName,
            D.Region,
            D.Country
    FROM    (
                SELECT e.FirstName + ' ' + e.LastName AS FullName,
                        e.Region,
                        e.Country
                FROM Employees e
                WHERE e.Country = 'USA'
                UNION ALL
               
                SELECT 'Immo Landwerth',
                        'Bavaria',
                        'Germany'
            ) D
 ORDER BY D.Country
)
SELECT e.FullName,
  e.Country
FROM MyEmployees e
Closed Oct 31, 2014 at 7:15 AM by terrajobst

comments