Insert Question
-
How do I Insert a copy of a record when I want to change ONLY one field.. INSERT INTO tb SELECT field1, field2, field3, field4, field5 FROM tb AS tb_1 WHERE (field1 = @Value) None of the selected items are the primary key, and this insert works fine for a perfect clone, but I need to be able to modify field1 with a textbox the user can type in. I know there is VALUE keyword.. but I can't seem to get it to work for just field1.
-
How do I Insert a copy of a record when I want to change ONLY one field.. INSERT INTO tb SELECT field1, field2, field3, field4, field5 FROM tb AS tb_1 WHERE (field1 = @Value) None of the selected items are the primary key, and this insert works fine for a perfect clone, but I need to be able to modify field1 with a textbox the user can type in. I know there is VALUE keyword.. but I can't seem to get it to work for just field1.
INSERT INTO tb SELECT @someValue, field2, field3, field4, field5 FROM tb AS tb_1 WHERE primaryKey = @primaryKey
A man said to the universe: "Sir I exist!" "However," replied the Universe, "The fact has not created in me A sense of obligation." -- Stephen Crane
-
INSERT INTO tb SELECT @someValue, field2, field3, field4, field5 FROM tb AS tb_1 WHERE primaryKey = @primaryKey
A man said to the universe: "Sir I exist!" "However," replied the Universe, "The fact has not created in me A sense of obligation." -- Stephen Crane
Thank you.