MSSQLTips.com - your daily source for SQL Server tips

Google
 
Web mssqltips.com

ESSENTIALS: Home | Tips | Search | Categories | Top 10 | Products | Authors | Blogs | Forums | Webcasts | Advertise | About
combining 2 store procedre - MSSQLTips

MSSQLTips

MSSQLTips.com - your daily source for SQL Server tips
Welcome to MSSQLTips Sign in | Join | Help
in Search

combining 2 store procedre

Last post 11-26-2007 10:01 PM by admin. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 11-26-2007 1:18 PM

    • firman
    • Top 500 Contributor
    • Joined on 11-26-2007
    • Posts 1

    combining 2 store procedre

    I had create two store procedure 1. Sp_collecting data (it's for colllecting data from database) 2. sp_numtoWord (it used for translate numeric to word pharse) i need to combining them,.... please give me tips/sample how to combining/ execute both, thank you...

    Filed under:
  • 11-26-2007 10:01 PM In reply to

    Re: combining 2 store procedre

    Firman,

    Here are a few options:

    Option 1 - New consolidated stored procedure

    CREATE PROCEDURE dbo.spConsolidated AS

    EXEC dbo.Sp_collecting

    EXEC dbo.sp_numtoWord

    GO

    Option 2 - Copy the code from the second stored procedure to the first stored procedure

    Option 3 - Have the first stored procedure call the second stored procedure

    CREATE PROCEDURE dbo.Sp_collecting AS

    -- Current Code

    -- New Code

    EXEC dbo.sp_numtoWord

    Thank you,
    The MSSQLTips.com Team

Page 1 of 1 (2 items)