Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6800939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:02:07+00:00 2026-05-26T19:02:07+00:00

I am calling a stored procedure from another stored procedure. That stored procedure is

  • 0

I am calling a stored procedure from another stored procedure. That stored procedure is returning an integer value always so I am accepting that value in one integer variable.

EXEC @IsBusinessDay  =  LiteIsWorkingDay @ExecutionStart

But even if stored procedure returning 1 value of the @IsBusinessDay is 0.

Code block

SELECT @ExecutionStart = CONVERT(VARCHAR, GETDATE(), 107)

EXEC @IsBusinessDay  =  LiteIsWorkingDay @ExecutionStart

IF(@IsBusinessDay = 0)
BEGIN
    IF(CONVERT(VARCHAR,@InterMediateStartDate,108) >  CONVERT(VARCHAR,GETDATE(),108))
    BEGIN   
        INSERT INTO TbJobQueue (JobId, ScheduleId, DueDate, Status, ExpiryDate, 
                                ProcessingDate, InputUser, InputTime, 
                                LastModifiedBy, LastModifiedTime)
        VALUES (@JobId, @ScheduleId,  @InterMediateStartDate,  'NQUE', NULL,
                NULL, 'Scheduler', GETDATE(), NULL, NULL)
    END
END

Please Help.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T19:02:08+00:00Added an answer on May 26, 2026 at 7:02 pm

    If you want the value of the stored procedure in a variable you have to make something like this:

    1. Declare output parameter in the LiteIsWorkingDay stored procedure

      create procedure LiteIsWorkingDay
      @ExecutionStart varchar(20), @IsBusinessDay int output

    2. In LiteIsWorkingDay stored procedure you have to select a value for the @IsBusinessDay output parameter.

    3. In the stored procedure that calls LiteIsWorkingDay you need to do something like this to get its value:

      declare @ExecutionStart varchar(20)
      select @ExecutionStart = convert(varchar, getdate(), 107)

      declare @IsBusinessDay int
      exec LiteIsWorkingDay, @IsBusinessDay output

    And that’s all. Now the variable @IsBusinessDay will have the value that you want 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm calling a stored procedure from C# .net and one of the string parameters
From the answers to calling a stored proc over a dblink it seems that
I have a stored procedure that inserts batches of millions of rows, emerging from
HI I am getting this exception when I am calling any stored procedure from
When calling a stored procedure from vb.net is there a default SQL timeout time
From PHP, I am calling a SQL stored procedure. The stored procedure checks the
I am calling a stored procedure from a DbContext using SqlQuery() . When I
I have an Oracle trigger which is calling a stored procedure that has PRAGMA
I've written a stored procedure that takes 15 min when executed from Management Studio.
Possible Duplicate: Spring's Stored Procedure - results coming back from procedure always empty. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.