cancel
Showing results for 
Search instead for 
Did you mean: 

BO4 - Listagg function not generating correct group by clause

former_member272336
Participant
0 Kudos

Hi,

Using bo4 sp08 and

BI4.x : GROUP BY not being generated for LISTAGG function in Information Design Tool | Business One ...

Query wont'r run due to group by clause not being generated correctly.

Should have extra line

group by DW.LATEST_PRODUCT_MV.PROD_NUM at bottom

but not generating it.

Any workaround for this?

Anyone know when going to b efixed?

SELECT

  LISTAGG((

WHOLESALER_DIM_ONLY.BRA_NUM ), ', ')

        WITHIN GROUP (ORDER BY (

WHOLESALER_DIM_ONLY.BRA_NUM )) "list",

  DW.LATEST_PRODUCT_MV.PROD_NUM

FROM

  WHOLESALER  WHOLESALER_DIM_ONLY,

  DW.LATEST_PRODUCT_MV,

  MEDIA

WHERE

  ( MEDIA.PLIS_PLANT_NUM=WHOLESALER_DIM_ONLY.SPO_NUM AND MEDIA.PLIS_PLANNED_ON_SALE_DATE BETWEEN WHOLESALER_DIM_ONLY.SPO_EFF_DATE AND WHOLESALER_DIM_ONLY.SPO_EXP_DATE  )

  AND  ( MEDIA.PROD_NUM = DW.LATEST_PRODUCT_MV.PROD_NUM and MEDIA.DIMENSION_KEY = MEDIA.PLIS_ID  )

  AND  ( MEDIA.DIMENSION_KEY = MEDIA.PLIS_ID  )

  AND  ( WHOLESALER_DIM_ONLY.DIMENSION_KEY = WHOLESALER_DIM_ONLY.SPO_ID  )

  AND 

  (

   DW.LATEST_PRODUCT_MV.PROD_NUM  =  4123

   AND

   MEDIA.ISS_ORIGINAL_YEAR_WEEK  =  201410

  )

/* @Variable('UNVNAME') - @Variable('BOUSER') - @Variable('DOCNAME') */

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

The only workaround I can think of is to edit the SQL

Click on View Script then Use Custom Query Script in the edit query section and then add the GROUP By for yourself.

former_member272336
Participant
0 Kudos

Thanks for update

Answers (0)