Tuesday, December 1, 2015

MSBI-SSIS IMPORTANT SCENARIOS



5TH SCENARIO: CAPTURING OUTPUT VALUE FROM A PROCEDURE


create procedure totalincome (@loc varchar(20),@total integer output)
as
begin
select  @total=sum(sal) from emp_hist where eloc=@loc;
end;



SCENARIO:
MOVING FIXED LENGTH DATA INTO VARIABLE LENGTH
INPUT FILE:




SCENARIO : PROCEDURE TO CAPTURE OUTPUT VALUE AND TO RETURN A VALUE

           BY PASSING AN INPUT VALUE

ALTER PROCEDURE NOV_PROC (@PARTYID VARCHAR(30),@NM VARCHAR(30) OUT)

AS

BEGIN

DECLARE @CNT INTEGER;

SELECT @NM=PARTYNAME FROM PARTY WHERE PARTYID=@PARTYID;

select @cnt=count(*) from party;

RETURN @CNT;

END;