|
-
April 18th, 2010, 09:44 AM
#1
INSERT after SELECT statement
Hello again
I am trying to select a record from a database and then amend one column in this record. I am unsure of how to code this SQL statement for a SQL Server database. Can anyone shed some light on this issue?
-
April 19th, 2010, 01:55 AM
#2
Re: INSERT after SELECT statement
Just to be sure, you want to add a column to a table?
It's not a bug, it's a feature!
-
April 19th, 2010, 04:39 AM
#3
Re: INSERT after SELECT statement
if you are trying to ammend one column then it is not called inserting , inserting means adding a row to the table...
-
April 19th, 2010, 04:48 AM
#4
Re: INSERT after SELECT statement
If you are adding one more column to the table then you will need Alter Table statement query, if you are adding a new row in the table then you will need Insert into statement query.
Hope this helps.
-
April 19th, 2010, 01:25 PM
#5
Re: INSERT after SELECT statement
If you are amending a value in an existing row, column then you need an UPDATE...SET... sql.
-
April 20th, 2010, 12:23 PM
#6
Re: INSERT after SELECT statement
 Originally Posted by zips
If you are amending a value in an existing row, column then you need an UPDATE...SET... sql.
Thats what I needed Thanks for the replies everyone.
-
April 21st, 2010, 12:34 PM
#7
Re: INSERT after SELECT statement
INSERT the record into the table, then using the PKey, select the row and UPDATE it.... is there a reason the value can't be set correctly when inserting the data in the first place?
-tg
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|