Welcome to Sign in | Help

Problema select din 2 tabele

  •  02-11-2009, 11:42 AM

    Problema select din 2 tabele

    Am 2 tabele Debit si Credit identice cu urmatoarea structura : cont, fel_valuta, suma, lei
    Trebuie sa le unesc intr-un singur tabel de forma: cont, debit_usd, credit_usd, debit_euro, credit_euro, ... unde debit_usd trebuie sa fie coloana suma din tabela Debit unde fel_valuta este USD, credit_usd = suma din tabela credit unde fel_valuta este USD si asa mai departe ptr. EUR.
    Tabelele nu au acelasi nr de conturi (unele pot sa existe doar in Credit si/sau Debit).
    Tabela rezultata trebuie sa aiba toate conturle din ambele tabele dar o singura data.
    Se poate ?



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