SQL Language (MOSC)

MOSC Banner

single group issue

edited Sep 24, 2010 5:30AM in SQL Language (MOSC) 6 commentsAnswered
 Ok... I give up.  I just want the first value of this list of 4.  I have tried 100 different combination's of group by but I still get ORA-00937: not a single-group group function.
 select min(inv.invoice_id)
                ,sum (DECODE (inv.invoice_currency_code,'USD', inv.amount_paid,
                 (inv.amount_paid * inv.exchange_rate))) OVER (PARTITION BY apd2.attribute1) paid_to_supplier
 from ap_invoices_all inv,ap_invoice_distributions_all apd2
      
 where inv.invoice_id = apd2.invoice_id
 and inv.payment_status_flag = 'Y'
 and apd2.attribute1 = '44063'

Currently:
Invoice_id    Paid to supplier
1                100
2                100
3                100
4                100

Wanted:
Invoice_id   Paid to supplier

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center