|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
updating column
hi all ,
I am trying to update a column in a sql server database based on the values of another column in the database the query i use is as follows update Service set Service1= (select subString(Service1,charindex('/',Service1)+1, len(Service1)) from Service) but i keep getting the following error Server: Msg 512, Level 16, State 1, Line 1 Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression. The statement has been terminated. could anyone please help me out. thank you harsha |
|
#2
|
||||
|
||||
|
you don't need a subquery for that
update Service set Service1= subString(Service1,charindex('/',Service1)+1,len(Service1)) |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > updating column |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|