sam_8286
发表于 2005-11-25 14:33
不好意思写错了awk'{print "0501"$0}' inputfile >outputfile
alinxiong
发表于 2005-11-28 16:02
unload to file.txt select lpad(帐号,12,0501),姓名,...
from ......
就搞定了
lmtok
发表于 2005-11-28 16:48
5楼的办法可行,用UE的也行,不过很是用awk比较好。
不过不会用awk的话,可以试试先load进去再update也行
czw1413_cn
发表于 2005-11-28 17:39
wenlq
发表于 2005-11-28 22:21
表里直接就可以update
update tab set col1 = '0501'|| col1 where ...
大蚂蚁
发表于 2005-11-28 22:36
原帖由 wenlq 于 2005-11-28 22:21 发表
表里直接就可以update
update tab set col1 = '0501'|| col1 where ...
:|:|:|
要是有100万行估计数据库要被锁了
大蚂蚁
发表于 2005-11-28 22:40
(1) 在字段前面加数据.
例子:select “00”||accountnumber from table
(2) 在字段后面加数据.直接加||会存在空格.这个时候需要利用trim这个命令.
例子: select trim(accountnumber)||”00” from table
怎么用unload导出就不必罗索了:em11:
ding161
发表于 2005-11-29 12:29
update tablename set 字段="0510"||字段 where ........
lobo767
发表于 2005-11-29 16:27
"0501"||字段名 如果有什么条件转换 (case 字段 when "xxxx" then"xxxxx" end)
[ 本帖最后由 lobo767 于 2005-11-29 16:33 编辑 ]
bluelover
发表于 2005-12-16 15:45