Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Mallen
Starting Member
27 Posts |
Posted - 2010-10-13 : 11:15:10
|
This is probably something obvious I am missing but I am getting the error "Insert Error: Column name or number of supplied values does not match table definition"For the life of me it looks like everything matches. Here is the code:CREATE TABLE Five9CSV(LRCS varchar (50),DNIS varchar (50),[DateTime] varchar (50),Disposition varchar (50),Comment varchar(250),Agent varchar(50));INSERT INTO FIVE9CSVSELECTf.LRCS,f.DNIS,(f.Date + f.Time),f.Disposition,f.Comment,f.AgentFROM @Five9CSV f;Am I doing something wrong with the temp table? With combining two fields into one? Any help is appreciated.Thanks. |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-10-13 : 11:20:14
|
execute the select part only and see what happens. No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
SD_Monkey
Starting Member
38 Posts |
Posted - 2010-10-13 : 11:49:05
|
i think your concatanition is having some error..convert first into varcharA maze make you much more better |
 |
|
X002548
Not Just a Number
15586 Posts |
|
pk_bohra
Master Smack Fu Yak Hacker
1182 Posts |
Posted - 2010-10-13 : 12:28:03
|
quote: Originally posted by Mallen This is probably something obvious I am missing but I am getting the error "Insert Error: Column name or number of supplied values does not match table definition"For the life of me it looks like everything matches. Here is the code:CREATE TABLE Five9CSV(LRCS varchar (50),DNIS varchar (50),[DateTime] varchar (50),Disposition varchar (50),Comment varchar(250),Agent varchar(50));INSERT INTO FIVE9CSVSELECTf.LRCS,f.DNIS,(f.Date + f.Time),f.Disposition,f.Comment,f.AgentFROM @Five9CSV f;Am I doing something wrong with the temp table? With combining two fields into one? Any help is appreciated.Thanks.
Can you please post the complete code because code used for creating table variable (@Five9CSV) and inserts into that table is not posted. |
 |
|
Mallen
Starting Member
27 Posts |
Posted - 2010-10-13 : 12:38:36
|
Well I ended up just making @Five9CSV and real table instead of a temp table and inserting it into a new table named Five9Exp. Exact same code only with no temp tables and everything is running fine. Now I am running into a problem with my date and time though which I guess I will post in a new thread >.<Thank you. |
 |
|
|
|
|
|
|