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 |
|
petek
Posting Yak Master
192 Posts |
Posted - 2008-11-03 : 05:03:13
|
| Hi AllFirstly thanks for looking......I need to run an update statement on a table that uses data from a column in a table an updates the destination column (in the same table)with that data.....Basically i am running the following code and it returns :Subquery returned more than 1 value.update dbo.HoldingtableNOMatch set initials = (Select SUBSTRING(Forenames,1,1)FROM HoldingtableNOMatch)What I am trying to do is select the first letter from the forename columnand update the initials column with the result, i have 200 rows in the tablePlease help....Kind RegardsPete. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-11-03 : 05:37:27
|
| is it this?update dbo.HoldingtableNOMatch set initials = SUBSTRING(Forenames,1,1) |
 |
|
|
petek
Posting Yak Master
192 Posts |
Posted - 2008-11-03 : 06:40:24
|
| visakh16 that was great, thanks for your help again.Kind RegardsPete. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-11-03 : 06:47:37
|
Cheers |
 |
|
|
|
|
|