List:General Discussion« Previous MessageNext Message »
From:Ed Reed Date:August 30 2005 10:08pm
Subject:Insert Into problem
View as plain text  
Can anyone please tell me why this fails, I've done this type of thing before without a
problem
 
Insert Into tbl1 Select 10306, fld2, fld3, fld4 From tbl1 Where fld1=8114
 

tbl1 has five fields all ints with fld5 being the autoincrement index.
 
I've also tried it as,
 
Insert Into tbl1 (fld1, fld2, fld3, fld4)
Values(Select 10306, fld2, fld3, fld4 From tbl1 Where fld1=8114)
 

I think its obvious what I want but just in case, I want to duplicate all the records
where fld1 matches my value and assign all the duplicate records a new value for fld1.
When I do it the first way I get a "Column Count doesn't match value count at row 1"
error. When I do it the second way I just get a syntax error.
 
Thanks!


Thread
Insert Into problemEd Reed30 Aug
  • Re: Insert Into problemEamon Daly30 Aug
  • Re: Insert Into problemSGreen30 Aug
Re: Insert Into problemEd Reed30 Aug