-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: How to use array_to_string function in hql
PostPosted: Fri Apr 19, 2013 8:33 am 
Newbie

Joined: Fri Apr 19, 2013 8:23 am
Posts: 1
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 .


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.