-->
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: Select inside case statment
PostPosted: Fri Dec 22, 2006 5:16 pm 
Newbie

Joined: Tue Jan 10, 2006 1:54 pm
Posts: 2
Hi
I am using Hibernate 3.2 . I am having issues with HQL which has case statementsin my where clause. Inside the case I do have a select statement and it seem it is not supported. Here is HQL


select
new com.assurant.inc.sas.reminder.dto.ReminderDTO
(reminder.rmndrId,
reminder.caseDetails.caseDetailsId,
reminder.caseDetails.solarId,
reminder.emailSalesAlertFlg,
reminder.emailNbcAlertFlg,
reminder.rmndrNoteTxt,
reminder.rmndrEffDt,
reminder.rmndrFollowUpDt,
ltrim(rtrim(companyGroup.name)),
ltrim(rtrim(broker.firmName)),
ltrim(rtrim(broker.lastName)),
ltrim(rtrim(broker.firstName)),
reminder.sasUserByCrtdUserId.userNm,
reminder.sasUserByCrtdUserId.displayNm,
case when reminder.emailSentDt is null then false
else true end )
from
Reminder reminder,
CompanyGroup companyGroup
inner join companyGroup.broker broker
inner join reminder.caseDetails caseDetails
where reminder.rmndrId =
(
(
case when reminder.emailSentDt is null then
(
select 1 from dual
)
else
(
select 1 from dual
)
end
)
)
and reminder.caseDetails.companyGroupId=companyGroup.companyGroupId
and caseDetails.solarId=:solarId


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.