• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to call Stored Procedure in hibernate which doesn't return results from any specific tables

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,

I have a stored Procedure which doesn't return result set from any specific tables. Below is the SP :

PROCEDURE [dbo].[spCMTGetClientSummaryRegion]
AS
BEGIN
SELECT 'North East' AS 'Region', '1' AS 'ActiveClients', '3.03%' AS 'Percentage', '1' AS 'Prospects', '3.03%' AS 'TotalPercentage'
END

Output :

Region ActiveClients Percentage Prospects TotalPercentage
North East 1 3.03% 1 3.03%

Now, I want to call this SP from Hibernate and store the result in a java bean object. Below is the hibernate call:

<sql-query name="callCMTGetClientSummaryRegion" callable="true">
<return alias="Client" class="ClientSummaryRegionVO"/>
{call spCMTGetClientSummaryRegion() }
</sql-query>

Where my bean object is ClientSummaryRegionVO. Please help.

Thanks in advance.

Regards,
Niranjan
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic