September 21, 2010 at 4:13 am
hi guys
i have this stored procedure
--
exec dbo.rpt_HS_BedsMI @insurer=@ins, @lwrDate=@lowerDate, @uprDate=@upperDate
exec dbo.rpt_HS_Breakdown @insurer=@ins, @lwrDate=@lowerDate, @uprDate=@upperDate
exec dbo.rpt_HS_BuildAreaMI @insurer=@ins, @lwrDate=@lowerDate, @uprDate=@upperDate
exec dbo.rpt_HS_BuildCTypeMI @insurer=@ins, @lwrDate=@lowerDate, @uprDate=@upperDate
exec dbo.rpt_HS_BuildNCBMI @insurer=@ins, @lwrDate=@lowerDate, @uprDate=@upperDate
exec dbo.rpt_HS_BuildSIMI @insurer=@ins, @lwrDate=@lowerDate, @uprDate=@upperDate
exec dbo.rpt_HS_BuildTypeMI @insurer=@ins, @lwrDate=@lowerDate, @uprDate=@upperDate
exec dbo.rpt_HS_BuildYAGE @insurer=@ins, @lwrDate=@lowerDate, @uprDate=@upperDate
exec dbo.rpt_HS_ContAreaMI @insurer=@ins, @lwrDate=@lowerDate, @uprDate=@upperDate
exec dbo.rpt_HS_ContCtypeMI @insurer=@ins, @lwrDate=@lowerDate, @uprDate=@upperDate
exec dbo.rpt_HS_ContNCBMI @insurer=@ins, @lwrDate=@lowerDate, @uprDate=@upperDate
exec dbo.rpt_HS_ContSIMI @insurer=@ins, @lwrDate=@lowerDate, @uprDate=@upperDate
exec dbo.rpt_HS_CtypeMI @insurer=@ins, @lwrDate=@lowerDate, @uprDate=@upperDate
exec dbo.rpt_HS_PAgeMI @insurer=@ins, @lwrDate=@lowerDate, @uprDate=@upperDate
exec dbo.rpt_HS_PCodeMI @insurer=@ins, @lwrDate=@lowerDate, @uprDate=@upperDate
i want to run it again after its run the first time excluding all the Claims and just running the
"exec dbo.rpt_HS_BedsMI @insurer=@ins, @lwrDate=@lowerDate, @uprDate=@upperDate" to do this can i just write at the bottom of the procedure "Else begin" ? and then make the statement?
thanks in advance.
September 21, 2010 at 4:34 am
you can create a SP which will call other SP based on your if, else condition
----------
Ashish
September 21, 2010 at 5:51 am
Hi
Agree with 'learningforearning
Ali
MCTS SQL Server2k8
September 21, 2010 at 6:04 am
So, why don't you just put "exec dbo.rpt_HS_BedsMI @insurer=@ins, @lwrDate=@lowerDate, @uprDate=@upperDate" at the end of what you've got?
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply