SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Insert into statement
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

dougancil
Posting Yak Master

USA
217 Posts

Posted - 10/04/2010 :  11:49:50  Show Profile  Send dougancil a Yahoo! Message  Reply with Quote
I'm pretty sure this is an easy question, but I have the following query:

Insert Into Scratchpad1 (Employeenumber, Name, Exceptiondate, Starttime, MinutesPaid)
SELECT EmployeeNumber, Name, exceptiondate, StartTime, MinutesPaid
From Scratchpad2

and when I run this query I get the following error:
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'Exceptiondate'.

Can someone please tell me what I'm missing?

Thank you

Doug

russell
Pyro-ma-ni-yak

USA
5072 Posts

Posted - 10/04/2010 :  12:09:45  Show Profile  Visit russell's Homepage  Reply with Quote
it means that there is no column called Exceptiondate in Scratchpad1. Check your spelling on the column name
Go to Top of Page

pk_bohra
Flowing Fount of Yak Knowledge

India
1182 Posts

Posted - 10/04/2010 :  13:44:58  Show Profile  Reply with Quote
quote:

SELECT EmployeeNumber, Name, exceptiondate, StartTime, MinutesPaid
From Scratchpad2


or may be Scratchpad2 doesn't have exceptiondate column.

Go to Top of Page

russell
Pyro-ma-ni-yak

USA
5072 Posts

Posted - 10/04/2010 :  15:36:39  Show Profile  Visit russell's Homepage  Reply with Quote
quote:
Originally posted by pk_bohra

quote:

SELECT EmployeeNumber, Name, exceptiondate, StartTime, MinutesPaid
From Scratchpad2


or may be Scratchpad2 doesn't have exceptiondate column.





No, because the error is on line 1.
Go to Top of Page

dougancil
Posting Yak Master

USA
217 Posts

Posted - 10/04/2010 :  16:21:28  Show Profile  Send dougancil a Yahoo! Message  Reply with Quote
It is because that column is missing. It was an oversight on my part. I apologize for opening this question.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000