Welcome to Sign in | Help

Re: problema select

  •  05-15-2008, 1:24 PM

    Re: problema select

    O posibilă soluţie propusă în condiţiile în care nu ai oferit suficiente informaţii:
    SELECT F.*, F.debit, C.credit2
    FROM
    (
    SELECT partener, tip, nr_doc, debit, nr_f
    FROM tabela
    WHERE tip = 'FAV'
    ) AS F

    INNER JOIN
    (
    SELECT nr_f, SUM(credt) as credit2
    FROM tabela
    WHERE tip = 'CHIT'
    GORUP BY nr_f
    ) AS C

    ON F.nr_f = C.nr_f

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