-
Nov 23rd, 2012, 01:52 AM
#1
DECODE function is not working for dynamic param in HQL
Hi i am trying to use the decode function in below mentioned HQL query in hibernate 3 in which i am setting :LANG_CODE as parameter but I am getting exception while running this
SELECT DECODE(:LANG_CODE,0,strUid_Desc,1,strUid_Desc_1,2, strUid_Desc_2,strUid_Desc), udsIdDefnInstance.strUid_Id FROM UdsIdDefnVO
its giving me this error
----------------------------------------------------------------
No data type for node: org.hibernate.hql.ast.tree.MethodNode
+-[METHOD_CALL] MethodNode: '('
| +-[METHOD_NAME] IdentNode: 'DECODE' {originalText=DECODE}
| \-[EXPR_LIST] SqlNode: 'exprList'
| +-[NAMED_PARAM] ParameterNode: '?' {name=LANG_CODE, expectedType=null}
| +-[NUM_INT] LiteralNode: '0'
| +-[DOT] DotNode: 'udsiddefnv0_.UID_DESC'
--------------------------------------------------
Its breaking my head,i googled it but didn't get any solutions.
Is any one having idea on setting parameter to decode function in HQL query will work or not..???if works then how can i achive this.!!!
Any help would be greatly appreciated....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules