求助,在SYBASE IQ中怎么用loca table 向表中导数据!
我的表结构是:create tablepe(
no varchart(4),
type varchart(5),
valuedecimal(18,2))
文件格式是:
8404|!20004|!147500000.00
7404|!20504|!147600000.00
6404|!20074|!247500000.00
请问怎么写load table 语句呀
非常感谢! load table pe
(
no'|!',
type'|!',
value'\x0a'
)
FROM '/path/file_name'
QUOTESOFF
ESCAPES OFF
回复 #2 chenfeng825 的帖子
小弟非常感谢!不在按上述写的执行,出现错误提示,提示信:
Could not execute statement.
ASA Error -1013027:Number of bytes(512)for column from an input file has exceeded the maximum allowed(4).
--(db_RecScanner.cxx 438)
Sybase error code=21,SQLState="QCA27"
Line 1,column 1
小弟是初学,希望各位大哥多多指教! 主要还是文本文件的格式引起的。
检查你的文本文件格式是unix的, 还是dos的
unix格式:
load table pe
(
no'|!',
type'|!',
value'\x0a'
)
FROM '/path/file_name'
QUOTESOFF
ESCAPES OFF
dos格式:
load table pe
(
no'|!',
type'|!',
value'\x0d\x0a'
)
FROM '/path/file_name'
QUOTESOFF
ESCAPES OFF 你的导入文件最后一行少个回车吧? 大家好。
我也踫到類似的問題,我的操作系統環境是AIX,執行load table時提示如下錯誤:
Msg 21, Level 14, State 0:
ASA Error -1013027: Number of bytes (2) for a column from an input file has
exceeded the maximum allowed (32767).
-- (db_RecScanner.cxx 725)
load table语句如下:
load table smmc_olapuser.nti_cdr_20110201
(
nti_code '|',
msgid '|',
src_locate '|',
dst_locate '|',
smcid '|',
src '|',
dst '|',
state '|',
deviceno '|',
recv_time '|',
done_time '|',
coding '|',
content '|',
src_type '|',
dst_type '|',
delivery_time '|',
expire_time '|',
alarm_type '|',
alarm_time '|',
alarm_resp '|',
during '|',
flag '\n' --(或'\0a')
)
from '/opt/smmc/data1/nti_cdr_20110201.bcp'
escapes off
quotes off
notify 1000000
with checkpoint on
后用“>”取nti_cdr_20110201.bcp的前10行,执行时却无报错,但在nti_cdr_20110201表里仍查不到相关记录,不知道是啥原因。
页:
[1]