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

  • SEARCH
  • Home
  • 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 583323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:46:49+00:00 2026-05-13T14:46:49+00:00

I have a problem/question that I may have been staring at too long today.

  • 0

I have a problem/question that I may have been staring at too long today.

I have a stored procedure that receives data from an web application. The data comes in as smalldate time format. I am trying to pass this information to a second stored procedure but the second one won’t fire unless the data is in single quotes. Would it be better to cast this as varchar?

The SET @CompletedDate must be ‘2010-01-20 15:28:00″ for obvious reasons. How do I pass this information to the second procedure?

DECLARE @return_value int
    ,@TaskID int
    ,@CompletedDate smalldatetime
SET @TaskID = 90
SET @CompletedDate = 2010-01-20 15:28:00

EXEC    @return_value = [dbo].[usp_Task_Completion]
        @TaskID = @TaskID,
        @CompletedDate = @CompletedDate

Here is the usp_Task_Completion SP

SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [dbo].[usp_Task_Completion]
@TaskID int 
,@CompletedDate smalldatetime
AS
BEGIN

SET NOCOUNT ON;

--Mark Transaction as complete
UPDATE dbo.Task
SET Completed = 1
    ,CompletedDate =  @CompletedDate
WHERE TaskID = @TaskID
  • 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-13T14:46:49+00:00Added an answer on May 13, 2026 at 2:46 pm

    no because a varchar will also have to be enclosed in single quotes, just put quotes around it

    DECLARE @return_value int
        ,@TaskID int
        ,@CompletedDate smalldatetime
    SET @TaskID = 90
    SET @CompletedDate = '2010-01-20 15:28:00'
    
    EXEC    @return_value = [dbo].[usp_Task_Completion]
            @TaskID = @TaskID,
            @CompletedDate = @CompletedDate
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This question has been answered. The problem was that myEventMoveTrainManaul() was being called from
I have a question that may have been answered over 9000 times before but
I have a homework question that says: Problem 1: Given the array [ 22
(I have a problem that I illustrated in this question but had no correct
Similar to this question: link However I have already mastered that. My problem is
Following on from a question I posted yesterday about GUIs, I have another problem
Edit: After addressing some issues that may or may not have been causing problems,
Problem: I have an address field from an Access database which has been converted
This is about my solution to that question It is been a long time
I have been messing with Oracle DB queries that run from my JAVA app.

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.