java - how to get only selected table from stored procedures? -


i have stored procedure following

create procedure [dbo].[spconfiguration_test] @id int select empid,name employee; select * address; 

i wanted call stored procedure jpa.so did this

daocode

public list test() {     string execproce="exec spconfiguration_test 1";     system.out.println(execproce);     query query = entitymanagerutil.entitymanager.createnativequery(execproce);     return query.getresultlist(); } 

service class code

list test=servicedaoimpl.test(); 

when debug list(test) size showing 1 , when run gives me records of 1st table(select empid,name employee;)

but want details of 2nd table when stored procedure executed.

can 1 guide me please?

if merge 2 queries one. must work.

example:

select e.empid       ,e.name       ,a.*   employee e       ,address  e.empid = a.empid; 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -