variation in the output generated
-
Hi all Actually am struglling with a problem ...here i got storedprocedure named Usp_Rpt_Proc1 which accepts two arguments in datetime fomat ...when am executing it from queryanaliser it's working fine am executing it like exec dbo.Usp_Rpt_Proc1 '1/1/2001','1/1/2008' it's returning some results as output but the problem is i want to modify that perticular procedure for that i copied and pasted the functionality (same code from SP) and inplace of CREATE PROCEDURE dbo.Usp_Rpt_Proc1 (@StartDate DateTime,@EndDate DateTime) AS am declare 2 datetime variables..and passing values for them ...and finaly am executing it.this time it's not returning any output...not showing errors aswelll just showing the column names with out content.... Plz let me now the reson behind it.....(In the second case am taking the exact code ...that's for sure).........Plz help me out With regards Yuva
-
Hi all Actually am struglling with a problem ...here i got storedprocedure named Usp_Rpt_Proc1 which accepts two arguments in datetime fomat ...when am executing it from queryanaliser it's working fine am executing it like exec dbo.Usp_Rpt_Proc1 '1/1/2001','1/1/2008' it's returning some results as output but the problem is i want to modify that perticular procedure for that i copied and pasted the functionality (same code from SP) and inplace of CREATE PROCEDURE dbo.Usp_Rpt_Proc1 (@StartDate DateTime,@EndDate DateTime) AS am declare 2 datetime variables..and passing values for them ...and finaly am executing it.this time it's not returning any output...not showing errors aswelll just showing the column names with out content.... Plz let me now the reson behind it.....(In the second case am taking the exact code ...that's for sure).........Plz help me out With regards Yuva
if you need return output parameter from stored procedure you must to set word out beside parameter for example declare @Time1 datetime declare @time2 datetime set @Time1 = '1/1/2001'--if this output parameter set out beside it set @Time2 = '1/1/2001' ============================================== exec dbo.Usp_Rpt_Proc1 @time1 out ,@Time2 out but this solve must used if the two output parameter CREATE PROCEDURE dbo.Usp_Rpt_Proc1 (@StartDate DateTime output,@EndDate DateTime output) =============================================== exec dbo.Usp_Rpt_Proc1 @time1 ,@Time2 out but this solve must used if the one output parameter CREATE PROCEDURE dbo.Usp_Rpt_Proc1 (@StartDate DateTime ,@EndDate DateTime output) ==================================================== exec dbo.Usp_Rpt_Proc1 @time1 ,@Time2 ,@output out but this solve must used if the one output parameter CREATE PROCEDURE dbo.Usp_Rpt_Proc1 (@StartDate DateTime ,@EndDate DateTime ,@output datatype output) if you need any thing reply with regards Rami Abd Alhalim