Thanks guys!
 

>>> [EMAIL PROTECTED]> 8/30/05 1:22 PM >>


The correct syntax for the second method doesn't use "VALUES()". I would always 
use this form if I were going to exclude any columns from receiving data. It's 
just safer and relies less on the SQL engine to correctly divine what it is you 
want to do. 

Insert Into tbl1 (fld1, fld2, fld3, fld4)
Select 10306, fld2, fld3, fld4 From tbl1 Where fld1=8114; 

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine
 
>>> "Eamon Daly" <[EMAIL PROTECTED]> 8/30/05 1:25 PM >>>
Drop the VALUES part in your second attempt:

INSERT INTO tbl1 (fld1, fld2, fld3, fld4)
SELECT 10306, fld2, fld3, fld4
FROM tbl1
WHERE fld1 = 8114

Note that you'll need to be running MySQL 4.0.14 or above to
insert into the same table you're selecting from.

____________________________________________________________
Eamon Daly


Reply via email to