Welcome to Sign in | Help

Re: select distinct...order by?

  •  08-03-2007, 12:49 PM

    Re: select distinct...order by?

    B_gd_n[ ]Sahlean:
    ...

    DESI ... DESI ... DESI ...

    ioana:

    The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common table expressions, unless TOP or FOR XML is also specified....

    deci nu pot pune order by in subquery?

     

    Big Smile

    SELECT DISTINCT Q.h  Q.x, Q.y, Q.z, Q.m, Q.n, Q.q

    FROM

    (
    SELECT TOP 100 PERCENT B.f, B.g, B.h, B.h  A.x, A.y, A.z, B.m, B.n, B.q
    FROM (B INNER JOIN A ON B.w=A.w)
    WHERE A.x = '1'
    ORDER BY B.f, B.g, B.h

    ) AS Q

     

View Complete Thread
Powered by Community Server (Commercial Edition), by Telligent Systems