Welcome to Sign in | Help

Re: nested select, e posibil?

  •  07-16-2009, 2:51 PM

    Re: nested select, e posibil?

    Nu stiu daca inteleg prea bine dar poate vrei ceva de genul:

    SELECT nrcontract,appid,rezolutie, comentarii,
    (
    SELECT max(c)
    FROM (
    SELECT dataplata AS c, nrcontract
    FROM history
    UNION ALL
    SELECT lastphonedate AS c, nrcontract
    FROM history
    ) u
    WHERE h.nrcontract = u.nrcontract
    )as t2,
    max(contactno)+1 as MaxC, lastmodifiedby, lastmodifydate
    FROM history h
    WHERE nrcontract='1'
    GROUP BY nrcontract, appid, rezolutie, comentarii, lastmodifiedby, lastmodifydate

    Te rog sa postezi scriptul de creare pentru tabela si sa explici ce anume doresti sa intoarca selectul. Asa doar am presupus cate ceva .........
    Cătălin D.
View Complete Thread
Powered by Community Server (Commercial Edition), by Telligent Systems