Error running SQL stored procedure

I am trying to run a stored procedure that checks for the existence of a temp. table, deletes it if it exists and then recreates it.  Then it appends records from an existing sql table.  Lastly, it displays the table.  I am getting an error:

Msg 213, Level 16, State 1, Procedure sp_DAILY_Roll_Forward, Line 12
Column name or number of supplied values does not match table definition.


I have checked and rechecked the code and the table definitions and cannot find an error.  

Please take a look at the following code and let me know what I am missing.

USE [livedb]
GO
/****** Object:  StoredProcedure [dbo].[sp_DAILY_Roll_Forward]    Script Date: 06/26/2015 17:29:03 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[sp_DAILY_Roll_Forward] 
	As
if OBJECT_ID(N'tempdb..#RollFwd') is not null
begin
	drop table #RollFwd
end
Create table #RollFwd(
      [AccountNumber] varchar (15)
      ,CAmt numeric(15,2)
      ,[VisitID] varchar (15)
      );
insert into #RollFwd 
SELECT  [AccountNumber] 
      ,sum([CMBal]) as CAmt
      ,[VisitID]
      
  FROM [livedb].[dbo].[tbl_DAILY_ATB_PDBAL]
  where VisitID is not null and SUBSTRING(AccountNumber,1,1)<>'B' and AccountNumber not in ('A00000221516','A0000222086','A00000272018') 
  group by [AccountNumber],[VisitID]

Open in new window


select *
From #RollFwd

thanks

Glen
GPSPOWAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dsackerContract ERP Admin/ConsultantCommented:
You need a comma after [AccountNumber] on line 20.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
GPSPOWAuthor Commented:
Thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2008

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.