Tom's Guide | Tom's Hardware | Tom's Games | PC Safety Suite
![]() |
![]() |
![]() |
Comment:
hi all,
have a sql question. i have a table which has a column varchar2(10) which holds employee numbers e.g 'X1234'. I need to update these and change them to lower case 'x' whereever they are uppercase 'X' e.g if number in column is 'X1234' i need to update it to be 'x1234'.i dont want to update one at a time so is there an easy way to update them all in a sql update statement ??
thanks in advance.
+1 | ![]() |
You don't want to update one at a time?
It's impossiable,for the database will change it one by one wahtever the sql is.
+1 | ![]() |
what i meant was i dont want to hard code each 'x number ' line by line. i dont really care how the db does it i just want the sql for it.
+1 | ![]() |
ok heres what i got so far :
update employee set number = (select lower(number) from employee where number like 'X%')
and this doesnt work since the subselect returns multiple rows.
so can someone suggest another way of doing this ??
![]() |
Rpair corrupt file
|
opening and reading a st...
|
| Login or Register to Reply | |
| Login | Register |