View previous topic :: View next topic
|
Author |
Message |
vindeee
New User
Joined: 29 Jun 2005 Posts: 2
|
|
|
|
For example, I have a column store where the values are of 4 digit and 5 digit values
STORE
====
100
2328
23456
222
2889
43754
I have to update the table like this.
STORE
====
100
2328
2345
222
2889
4375
Please help me do this using update SQL? |
|
Back to top |
|
|
somasundaran_k
Active User
Joined: 03 Jun 2003 Posts: 134
|
|
|
|
vindeee
Try this out.
Code: |
UPDATE your.table
SET STORE= CONCAT (SUBSTR(STORE,1,4),' ')
;
|
hth
-Som |
|
Back to top |
|
|
vindeee
New User
Joined: 29 Jun 2005 Posts: 2
|
|
|
|
The datatype of store is numeric and not character. So usage of substring will result in sqlerror -171. |
|
Back to top |
|
|
|