This topic has been archived. It cannot be replied.
-
工作学习 / 专业技术讨论 / 一个字段里面如果同时有字符和数字,如不用编程序,有没有简单的办法把它们拆出来呢?
-o2o2o2(无所谓);
2005-5-14
(#2295386@0)
-
yeah, any editor that has search/replace ( support r/e would make your work even more easier)
-canadiantire(轮胎-M.I.N.K.);
2005-5-14
(#2295395@0)
-
怪我没有说清楚,我是要改动数据库里面的数据,是DB2.
-o2o2o2(无所谓);
2005-5-14
(#2295407@0)
-
用sql可以把字段种含有1-9的纪录找出来,行吗?
-aka(棒棒);
2005-5-14
(#2295469@0)
-
能告诉我具体怎么做吗?
-o2o2o2(无所谓);
2005-5-15
(#2296271@0)
-
oracle 10i support regular expression in sql statment. it may be the first database support RE.what do you want?
1. select the record. SCOPE:table, OUT: selected rows with the specific field contain specific character/digits.
2. select the value, remove all digital( or character) in the value. SCOPE:table, specific column. out: remove specific character/digitals from the specific column in the output
3. replacement? same as (2), replacement instead of removing. like encoding.
-647i(六不一没有);
2005-5-15
{389}
(#2296296@0)
-
我要把那个包含了字符和数字的字段(OLD)拆成两个字段分别包含字符(NEWCHAR)和数字(NEWINT).所以,要从那个OLD字段里面把数字弄出来插入到NEWINT里面,把字符插入到NEWCHAR里面.想找个简单方法...
-o2o2o2(无所谓);
2005-5-15
(#2296456@0)
-
不用编程是什么意思?oracle里有ltrim(), Rtrim()可以用,db2应该有相似的吧?SQL> select rtrim('dfsdsdfasdfsadf5675633452909','1234567890') result from dual;
RESULT
---------------
dfsdsdfasdfsadf
//////////////////////////////////////////////////////////////////////////////////////
SQL> select ltrim('8793456345634560dfsdsdfasdfsadf','1234567890') result from dual;
RESULT
---------------
dfsdsdfasdfsadf
-markriver(markriver);
2005-5-15
{351}
(#2296595@0)
-
substring(), ischar(), isdigit(), left(), mid(), decode().... check your DB function lib, just as you do it in MS Excel.
-647i(六不一没有);
2005-5-15
(#2296621@0)
-
先谢谢大家,这两天忙别的去了,没有时间去试呢.以后再请教!
-o2o2o2(苯小孩);
2005-5-18
(#2302954@0)