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 7001225
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:46:34+00:00 2026-05-27T20:46:34+00:00

I am trying to create a stored procedure but am getting these errors: Msg

  • 0

I am trying to create a stored procedure but am getting these errors:

Msg 207, Level 16, State 1, Procedure Insert_QuickLabDump, Line 42
Invalid column name 'Date_Collected'.
Msg 207, Level 16, State 1, Procedure Insert_QuickLabDump, Line 43
Invalid column name 'Time_Collected'.
Msg 207, Level 16, State 1, Procedure Insert_QuickLabDump, Line 43
Invalid column name 'Date_Entered'.
Msg 207, Level 16, State 1, Procedure Insert_QuickLabDump, Line 44
Invalid column name 'Time_Entered'.
Msg 207, Level 16, State 1, Procedure Insert_QuickLabDump, Line 45
Invalid column name 'Date_Completed'.
Msg 207, Level 16, State 1, Procedure Insert_QuickLabDump, Line 46
Invalid column name 'Time_Completed'.
Msg 207, Level 16, State 1, Procedure Insert_QuickLabDump, Line 47
Invalid column name 'Test_Date'.
Msg 207, Level 16, State 1, Procedure Insert_QuickLabDump, Line 48
Invalid column name 'Test_Time'.

here is the full source:

USE [SalesDWH]
GO

/****** Object:  StoredProcedure [dbo].[Insert_QuickLabDump]    Script Date: 12/22/2011 14:52:48 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER on
GO

-- =============================================
-- Author:      <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
create PROCEDURE [dbo].[Insert_QuickLabDump]
    -- Add the parameters for the stored procedure here
    @Specimen_ID [varchar](50),
    @Client_Key int,
    @Outcome [varchar](50),
    @Medications [varchar] (max),
    @Date_Collected date,
@Time_Collected time ,
@Date_Entered date,
@Time_Entered time ,
@Date_Completed date,
@Time_Completed time ,
@Test_Date date ,
@Test_Time time ,

    @Practice_Name [varchar] (500),
    @Practice_Code [varchar] (500),
    @Client_ID [varchar] (500),
    @Requesting_Physician [varchar] (500),
    @Other_Medications [varchar] (max),
    @Order_Comments [varchar] (max),
    @Reference_Number [varchar] (500),
    @Order_Count int

AS
BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON;

    INSERT INTO [SalesDWH].[dbo].[QuickLabDump]
           ([Specimen ID]
           ,[Client Key]
           ,[Outcome]
           ,[Medications]
           ,[Date_Collected]
           ,[Time_Collected]
           ,[Date_Entered]
           , [Time_Entered]
           , Date_Completed
           , Time_Completed
           , Test_Date
           , Test_Time
           ,[Practice Name]
           ,[Practice Code]
           ,[Client ID]
           ,[Requesting Physician]
           ,[Other Medications]
           ,[Order Comments]
           ,[Reference Number]
           ,[Order Count]
     )
     VALUES
           (@Specimen_ID,
@Client_Key,
@Outcome,
@Medications,
@Date_Collected ,
@Time_Collected ,
@Date_Entered,
@Time_Entered ,
@Date_Completed ,
@Time_Completed,
@Test_Date ,
@Test_Time,
@Practice_Name,
@Practice_Code,
@Client_ID,
@Requesting_Physician,
@Other_Medications,
@Order_Comments,
@Reference_Number,
@Order_Count
)


END

What am I doing wrong?

here is the table structure:

USE [SalesDWH]
GO

/****** Object:  Table [dbo].[QuickLabDump]    Script Date: 12/22/2011 15:13:40 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[QuickLabDump](
    [id] [int] IDENTITY(1,1) NOT NULL,
    [Specimen ID] [varchar](50) NOT NULL,
    [Client Key] [int] NOT NULL,
    [Outcome] [varchar](50) NOT NULL,
    [Medications] [varchar](max) NULL,
    [Date Collected] [date] NOT NULL,
    [Time Collected] [time](7) NOT NULL,
    [Date Entered] [date] NOT NULL,
    [Time Entered] [time](7) NOT NULL,
    [Date Completed] [date] NOT NULL,
    [Time Completed] [time](7) NOT NULL,
    [Test Date] [date] NOT NULL,
    [Test Time] [time](7) NOT NULL,
    [Practice Name] [varchar](500) NOT NULL,
    [Practice Code] [varchar](500) NOT NULL,
    [Client ID] [varchar](500) NULL,
    [Requesting Physician] [varchar](500) NULL,
    [Other Medications] [varchar](max) NULL,
    [Order Comments] [varchar](max) NULL,
    [Reference Number] [varchar](500) NULL,
    [Order Count] [int] NOT NULL
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO
  • 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-27T20:46:34+00:00Added an answer on May 27, 2026 at 8:46 pm

    It looks like you added those columns to an existing procedure. Have you added the columns to the database table you are trying to insert to?

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

Sidebar

Related Questions

I'm trying to create the following stored procedure in phpMyAdmin. But, I keep getting
I am trying to use Sp_configure Proc in another stored procedure, but getting errors.
I have an already existing stored procedure. But when I am trying to create
I'm trying to create my first mysql stored procedure, but script doesn't work due
I am trying to create a simple stored procedure in phpmyadmin. But the page
I'm trying to create a sql update query for a stored procedure but I'm
I'm trying to call a stored procedure using Hibernate, but I'm getting the following
I'm trying to create a stored procedure but it failed and I don't know
Trying to create a user account in a test. But getting a Object reference
I'm trying to create stored procedure in MySQL Community Server 5.5.16: CREATE UNIQUE SEQUENCE

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.