Hi,
I have an sql in which i used array_to_string function.
SQL is like this -
SELECT ARRAY_TO_STRING(array_agg(COALESCE(S.DOC,'')),',') AS DOC FROM (SELECT DISTINCT M_INOUT.DOCUMENTNO AS DOC FROM M_INOUT LEFT JOIN M_INOUTLINE ON M_INOUT.M_INOUT_ID=M_INOUTLINE.M_INOUT_ID LEFT JOIN C_INVOICELINE ON M_INOUTLINE.M_INOUTLINE_ID=C_INVOICELINE.M_INOUTLINE_ID WHERE M_INOUTLINE.M_INOUTLINE_ID=C_INVOICELINE.M_INOUTLINE_ID )S
I need to convert this into hql form. I am able to do convert sql to hql without array_to_string HQL query
select mi.documentNo as doc from MaterialMgmtShipmentInOut mi, MaterialMgmtShipmentInOutLine mil, InvoiceLine cil where mi.id=mil.shipmentReceipt and cil.goodsShipmentLine= mil.id
Please advice me to use array_to_string in my hql .
|