SQL Language (MOSC)

MOSC Banner

subquery min limitation

edited Jan 3, 2011 10:51AM in SQL Language (MOSC) 2 commentsAnswered ✓
 Hello all,
This query is going to be a subquery in the From statement.  I need the additional fields for my end query Where statements. Would someone help me understand why I do not get a single row like I expect?  There are 3 distributions total, 2 with the line_type_lookup_code of ITEM.  I get the two rows returned.

SELECT MIN(apd1.invoice_distribution_id) invoice_distribution_id ,
                        apd1.po_distribution_id,
                        apd1.attribute1
               FROM ap_invoice_distributions_all apd1
               WHERE apd1.line_type_lookup_code = 'ITEM'
                and apd1.attribute1 = '20024'
               GROUP BY apd1.attribute1,
                        apd1.invoice_distribution_id,

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