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 |
|
Jocc
Starting Member
2 Posts |
Posted - 2011-08-03 : 12:15:47
|
| Hi , I am a newbie in Sql programming.I would like to add two rows in a cloumn to get a valueFor instance;Qid, Qno, Answer371, 35, 44222, 38, 45i need to add both answers to give me a value for another column.thanks in advance. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-08-03 : 12:53:14
|
| what do you mean by add? do you mean 44 + 45=89 as the result for another column. then probably what you need is a computed column.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
Jocc
Starting Member
2 Posts |
Posted - 2011-08-03 : 14:50:57
|
| Yes I thats what i mean.how do i add the computed column. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-08-04 : 08:45:39
|
just add like example belowCREATE TABLE tablename(A int,B int,C AS A + B) ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|