user2444474
user2444474

Reputation: 573

oracle Listagg query issue

I'm trying to execute the query with listaggand regex.Its giving me an error..

PRODUCT      DESCR            PRENBR      PREDESCR            dependies
101400      karupm           3213         oaera              1234 SW AND 3213 W
101400      Simple           234          samp               1234 SW AND 3213 W
101401      Opsim Op SW      3534         SimPilo            1595 SW OR 3533 SW AND 3534 NS
101401      Opsim Op SW      3533         Eldo Ap            1595 SW OR 3533 SW AND 3534 NS
101401      Opsim Op SW      1595         AccuSim II         1595 SW OR 3533 SW AND 3534 NS

Upvotes: 0

Views: 139

Answers (1)

sgeddes
sgeddes

Reputation: 62831

Not exactly sure what error you are receiving, but I might guess that it's a GROUP BY error. You are selecting part.part_nbr in your statement, but then grouping by part.part_id.

Try changing your GROUP BY to:

GROUP BY part.part_nbr

Or, if you need to group by both:

GROUP BY part.part_id, part.part_nbr

Upvotes: 3

Related Questions