terrajobst / nquery

NQuery is a relational query engine written in C#. It allows you to execute a SELECT query against .NET objects.
MIT License
72 stars 20 forks source link

Infinite loop #13

Open terrajobst opened 9 years ago

terrajobst commented 9 years ago

Ported from CodePlex

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
dallmair commented 7 years ago

Fixed in NQuery v.Next PR # 1.