简体   繁体   中英

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM