June 6, 2003 at 6:34 am
Hi,
I have a table which contains 2 columns
I want to copy the value in column 1 to column 2.
Schema:
tblStore
Column1 INT (contains the values that I want to copy over)
Column2 INT NULLABLE (at the moment, this is empty)
I tried
<code>
INSERT INTO tblStore
(column2)
VALUES (column1)
</code>
I also tried:
<code>
INSERT INTO tblStore.column2
SELECT column1
FROM tblStore
</code>
but no joy either.I am sure that I am on the right lines.Can anyone give me a push?
Many thanks,
yogi
June 6, 2003 at 7:20 am
update tblStore set column2 = column1
June 6, 2003 at 7:20 am
Do
UPDATE tblName SET Col2 = Col1
June 6, 2003 at 7:44 am
Thanks folks, I bet you're glad everyone's not as stupid as me 🙂
cheers, yogi
June 10, 2003 at 8:47 am
UPDATE TBLSTORE SET COLOUMN2 = COLOUMN1
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply