Home > database >  PB can obtain two query result of the stored procedure
PB can obtain two query result of the stored procedure

Time:09-18

Such as the create proc usp_test as
Select * from tablea;
Select * from tableb;


PB calls the stored time how to get both the query result set, as if can only get the top one. C # can are these

CodePudding user response:

refer to the original poster qq281803181 response:
, such as the create proc usp_test as
Select * from tablea;
Select * from tableb;


PB calls the stored time how to get both the query result set, as if can only get the top one. These are c # can


The background to the results of the two SQL statements inserted into a table, and then in the pb from the table

CodePudding user response:

On the top floor,,,,,,,,

CodePudding user response:

reference 1st floor lzp_lrp response:
Quote: refer to the original poster qq281803181 response:

Such as the create proc usp_test as
Select * from tablea;
Select * from tableb;


PB calls the stored time how to get both the query result set, as if can only get the top one. These are c # can


The background to the results of the two SQL statements inserted into a table, and then in the pb from the table can be take



The background to the results of the two SQL statements inserted into a table, as I have no data inside a payroll,
I have to pay and the withholding of two parts, one should pay is personal information query in the post, and withhold part is manually entered, like this,
How do I write the database process? Call it again?
I wrote a about in the front of the query process,
But how do I display by dw, and below should have input withholding Spaces?
The CREATE OR REPLACE Function sf_yfgz_zcwage (empid0 In Varchar2, zcwage Out Number, zwwage Out Number)
Return px_emp000. Ename0 % Type
As
V_ename0 px_emp000. Ename0 % Type;
The Begin
The Select ename0 Into v_ename0 From px_emp000 Where empid0=empid0;
The Select zc zcwage, zw. Zwwage Into zcwage, zwwage
The From px_emp000 e, px_zc0000 zc, px_zw0000 zw
Where e.z cid00=zc. Zcid00 And e.z wid00=zw. Zwid00 And e.e mpid0=empid0; - query the basic salary and position salary
The Select mksjt0 Into v_gz
The From px_emp000 e, px_jxjt00 j
Where e.z cid00=j.z cid00 And e.e mpid0=empid0 - query allowance per period
The Select keshis Into v_gz
The From px_emp000 e, px_grjxdj g
Where e.e mpid0=g.e mpid0 And gdjtime=djtime
The select g. eshis * j.m ksjt0 Into v_gz
The From px_emp000 e, px_grjxdj g, px_jxjt00 j
Where e.z cid00=j.z cid00 And g.d jtime=djtime And e.e mpid0=empid0 - inquiry teaching benefits
The Select k.m ykyjt Into v_gz
The From px_emp000 e, px_kyjt00 k
Where e.z cid00=k.z cid00 And e.e mpid0=empdi0 - query research grants

Return v_ename0;
The End;
I want to input the salary and number of employees in February, to get basic salary and position salary allowance teaching benefits, display in a dw, dw with wages watch is the
Then I input the withholding, and then click the calculate, calculate the should pay, and then click save and then finally saved to the table, the wages, and that have plagued the, I was 2 weeks,,,
Estimate the third week or so, and I think I will lost the first job in my life,

CodePudding user response:

The select empid0, Max (zcwage) as zcwage, Max (zwwage) as zcwage, Max (mksjt0) as mksjt0, Max (mksjt0) as keshis
The from (
Select e. empid0 zcwage, zwwage, 0 as mksjt0, 0 keshis
The From px_emp000 e, px_zc0000 zc, px_zw0000 zw
Where e.z cid00=zc. Zcid00 And e.z wid00=zw. Zwid00 And e.e mpid0=empid0; - query the basic salary and position salary
Union all
The select e.e mpid0, 0 as zcwage, 0 as zwwage, mksjt0, 0 as keshis
The From px_emp000 e, px_jxjt00 j
Where e.z cid00=j.z cid00 And e.e mpid0=empid0 - query allowance per period
Union all
The select e.e mpid0, 0 as zcwage, 0 as zwwage, 0 as mksjt0, keshis
The From px_emp000 e, px_grjxdj g
Where e.e mpid0=g.e mpid0 And gdjtime=djtime
Union all
The select g. eshis * j.m ksjt0 Into v_gz
The From px_emp000 e, px_grjxdj g, px_jxjt00 j
Where e.z cid00=j.z cid00 And g.d jtime=djtime And e.e mpid0=empid0 - inquiry teaching benefits
) a

CodePudding user response:

Group by empid0 write less 1 above, a casual wrote, no detection, about the same, need not stored procedures, directly to inside

CodePudding user response:

Union all not line
  • Related