Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
jmodiba
Starting Member
7 Posts |
Posted - 2008-10-29 : 05:03:48
|
| am trying to write an insert statement into table but for specific field only where there is a unique primary key to identify please see below my scriptinsert into SrcHoldingExternal([units])VALUES (16098.630000)and srcholdingexternalid =1871906 |
|
|
karthickbabu
Posting Yak Master
151 Posts |
Posted - 2008-10-29 : 05:07:14
|
| You can easily update that fieldUPDATE SrcHoldingExternal SET Units = 16098.630000 WHERE srcholdingexternalid = 1871906================================================When you realize you've made a mistake, take immediate steps to correct it. |
 |
|
|
Transact Charlie
Master Smack Fu Yak Hacker
3451 Posts |
Posted - 2008-10-29 : 05:09:19
|
NB : I think previous poster is right. I think you want an update rather than an insert.Maybe thisINSERT INTO SrcHoldingExternal ( [units] ) VALUES 16098.630000 I don't understand what you mean by the lineand srcholdingexternalid =1871906 I can't tell what that relates to from the info you have given.Maybe you should describe the table and the data you are trying to insert and how you need it all to look at the end of the process?-------------Charlie |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-10-29 : 05:12:38
|
| Seems like OP meant an update of record with value 1871906 in which karthickbabu's solution is what OP needs. |
 |
|
|
jmodiba
Starting Member
7 Posts |
Posted - 2008-10-29 : 06:13:07
|
| thanks guys i think it worked chow |
 |
|
|
|
|
|