| Author |
Topic |
|
brendalisalowe
Constraint Violating Yak Guru
269 Posts |
Posted - 2004-06-23 : 11:49:53
|
| Can anyone tell me why this won't work?INSERT INTO tblNewCase ('#',CaseNumber,'#','1','#','0','#',FullName,'#','NULL','#',MailAddress,'#',MailCity,'#',MailState,'#',MailZipCode,'#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#',PropAddress,'#',PropCity,'#',PropState,'#',PropZipCode,'#','#',MortAmount,'#',PaidUpFront,'#',HoldingMor,'#',ServingMor,'#',EndorseMonth+'/',EndorseDay+'/',EndorseYear,'#',Term,'#',MaturityMonth+'/',MaturityDay+'/',MaturityYear,'#',EncumMonth+'/',EncumDay+'/',EncumYear,'#',RefundAmount,'#','11','#','#','#','#','#')SELECT CaseNumber,FullName,MailAddress,MailCity,MailState,MailZipCode,PropAddress,PropCity,PropState,PropZipCode,MortAmount,PaidUpFront,HoldingMor,ServingMor,EndorseMonth,EndorseDay,EndorseYear,Term,MaturityMonth,MaturityDay,MaturityYear,EncumMonth,EncumDay,EncumYear,RefundAmountFROM tblHUDdata;I know that looks like a bunch of junk, but I need all of that data. PLEASE HELP! |
|
|
DavidRhodes
Starting Member
40 Posts |
Posted - 2004-06-23 : 12:00:25
|
| The number of columns doesn't match. ieyou haveINSERT INTO tblNewCase ('#',CaseNumber,'#','1','#','0','#',FullName........thenSELECT CaseNumber,FullName |
 |
|
|
brendalisalowe
Constraint Violating Yak Guru
269 Posts |
Posted - 2004-06-23 : 13:21:11
|
| But I need to insert '#' into some columns. How can I insert those plus pull data from the other table? What is the best way to insert it? PLEASE HELP! |
 |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2004-06-23 : 13:52:46
|
| INSERT INTO myTable99(Col1,CaseNumber,Col3,COl4)SELECT '#', CAseNumber, '#',Col4 FROM myOtherTableThe collist has to match the number of columns in the SELECTBrett8-) |
 |
|
|
|
|
|