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 |
sfjtraps
Yak Posting Veteran
65 Posts |
Posted - 2009-03-06 : 09:11:16
|
I want to insert data into a sql table based on ID numbers associated with that data. The data needs to be inserted into a specific column where id number in the record equals 'IDNum'. The data looks like the following:ID Number Data1 piece of data2 piece of data23 piece of data3Can anyone help? |
|
vijayisonly
Master Smack Fu Yak Hacker
1836 Posts |
Posted - 2009-03-06 : 09:17:56
|
Can you provide some more information..."where id number in the record equals 'IDNum'"...does this mean the value in the column is 'IDNum' or is there another column called IDNum which has to match with the id number that we have in the sample data?Please post your expected output as well. |
|
|
sfjtraps
Yak Posting Veteran
65 Posts |
Posted - 2009-03-06 : 09:38:26
|
My apology,To be more clear, I want to insert data into a sql table column called 'data' where the ID number (there is a column called IDNum) associated with that data is a number 1.Hopefully this makes more sense, I think I may have over-complicated my first entry. |
|
|
vijayisonly
Master Smack Fu Yak Hacker
1836 Posts |
Posted - 2009-03-06 : 09:51:57
|
Ok...sounds like what you need is an update..UPDATE yourtableSET Data = 'whatever you want to update'WHERE IDNum = 1 |
|
|
|
|
|