- CREATE TABLE dbo.DM_DJ_BGLB (
- BGLB_DM char(2) NOT NULL,
- BGLB_MC varchar(50) NOT NULL,
- XG_BJ char(1) NOT NULL,
- LR_SJ datetime NULL,
- XG_SJ datetime NULL,
- LRRY_DM varchar(30) NULL,
- XGRY_DM varchar(30) NULL,
- CONSTRAINT DM_DJ_BGLB_5016258491 PRIMARY KEY NONCLUSTERED(BGLB_DM)
- WITH max_rows_per_page = 0, reservepagegap = 0
- )
- LOCK DATAROWS
- WITH exp_row_size = 0,
- reservepagegap = 0,
- identity_gap = 0
- ON 'default'
- GO
- CREATE TABLE dbo.DM_DJ_BGXM (
- BGXM_DM char(8) NOT NULL,
- BGXM_MC varchar(50) NOT NULL,
- BGXM_JC varchar(30) NOT NULL,
- XG_BJ char(1) NOT NULL,
- BGDX_DM char(5) NOT NULL,
- SJB_LM varchar(30) NOT NULL,
- SJB_LLX char(2) NOT NULL,
- LR_SJ datetime NULL,
- XG_SJ datetime NULL,
- SJB_BJ char(2) NULL,
- SJDMB_MC varchar(30) NULL,
- SJDMB_ZJ varchar(30) NULL,
- SJDMB_ZJLX char(2) NULL,
- SJDMB_LMC varchar(30) NULL,
- LRRY_DM varchar(30) NULL,
- XGRY_DM varchar(30) NULL,
- JY_TJ varchar(20) NULL,
- dmTablefilter varchar(200) NULL,
- CONSTRAINT DM_DJ_BGXM_12021523471 PRIMARY KEY NONCLUSTERED(BGXM_DM)
- WITH max_rows_per_page = 0, reservepagegap = 0
- )
- LOCK DATAROWS
- WITH exp_row_size = 0,
- reservepagegap = 0,
- identity_gap = 0
- ON 'default'
- GO
- CREATE TABLE dbo.DM_DJ_DJLX (
- DJLX_DM char(1) NOT NULL,
- DJLX_MC varchar(100) NOT NULL,
- DJLX_JC varchar(5) NULL,
- SWJG_DM varchar(20) NULL,
- XY_BJ char(1) NULL,
- XY_QSRQ date NULL,
- XY_ZZRQ date NULL,
- LRRY_DM varchar(30) NULL,
- LR_SJ datetime NULL,
- XGRY_DM varchar(30) NULL,
- XG_SJ datetime NULL,
- DJLX_LSH numeric(10,0) IDENTITY NOT NULL,
- CONSTRAINT DM_DJ_DJLX_1308124971 PRIMARY KEY NONCLUSTERED(DJLX_LSH)
- WITH max_rows_per_page = 0, reservepagegap = 0
- )
- LOCK DATAROWS
- WITH exp_row_size = 0,
- reservepagegap = 0,
- identity_g
-
- <SPAN style="COLOR: #ff0000">ORA-00906: 缺失左括号</SPAN>
CREATE TABLE dbo.DM_DJ_BGLB (
BGLB_DM char(2) NOT NULL,
BGLB_MC varchar(50) NOT NULL,
XG_BJ char(1) NOT NULL,
LR_SJ datetime NULL,
XG_SJ datetime NULL,
LRRY_DM varchar(30) NULL,
XGRY_DM varchar(30) NULL,
CONSTRAINT DM_DJ_BGLB_5016258491 PRIMARY KEY NONCLUSTERED(BGLB_DM)
WITH max_rows_per_page = 0, reservepagegap = 0
)
LOCK DATAROWS
WITH exp_row_size = 0,
reservepagegap = 0,
identity_gap = 0
ON 'default'
GO
CREATE TABLE dbo.DM_DJ_BGXM (
BGXM_DM char(8) NOT NULL,
BGXM_MC varchar(50) NOT NULL,
BGXM_JC varchar(30) NOT NULL,
XG_BJ char(1) NOT NULL,
BGDX_DM char(5) NOT NULL,
SJB_LM varchar(30) NOT NULL,
SJB_LLX char(2) NOT NULL,
LR_SJ datetime NULL,
XG_SJ datetime NULL,
SJB_BJ char(2) NULL,
SJDMB_MC varchar(30) NULL,
SJDMB_ZJ varchar(30) NULL,
SJDMB_ZJLX char(2) NULL,
SJDMB_LMC varchar(30) NULL,
LRRY_DM varchar(30) NULL,
XGRY_DM varchar(30) NULL,
JY_TJ varchar(20) NULL,
dmTablefilter varchar(200) NULL,
CONSTRAINT DM_DJ_BGXM_12021523471 PRIMARY KEY NONCLUSTERED(BGXM_DM)
WITH max_rows_per_page = 0, reservepagegap = 0
)
LOCK DATAROWS
WITH exp_row_size = 0,
reservepagegap = 0,
identity_gap = 0
ON 'default'
GO
CREATE TABLE dbo.DM_DJ_DJLX (
DJLX_DM char(1) NOT NULL,
DJLX_MC varchar(100) NOT NULL,
DJLX_JC varchar(5) NULL,
SWJG_DM varchar(20) NULL,
XY_BJ char(1) NULL,
XY_QSRQ date NULL,
XY_ZZRQ date NULL,
LRRY_DM varchar(30) NULL,
LR_SJ datetime NULL,
XGRY_DM varchar(30) NULL,
XG_SJ datetime NULL,
DJLX_LSH numeric(10,0) IDENTITY NOT NULL,
CONSTRAINT DM_DJ_DJLX_1308124971 PRIMARY KEY NONCLUSTERED(DJLX_LSH)
WITH max_rows_per_page = 0, reservepagegap = 0
)
LOCK DATAROWS
WITH exp_row_size = 0,
reservepagegap = 0,
identity_g
ORA-00906: 缺失左括号
这是sybase导出来的sql建表语句,我想将表结构倒入oracle,倒入的时候就出现ORA-00906: 缺失左括号。求高人解决问题。。。或者提供导入的正确的方法。小弟谢啦。
------------------------------------------------------------------------------------------------------------------
问题补充:
langshao 写道
- CREATE TABLE DM_DJ_BGLB (
- BGLB_DM char(2) NOT NULL,
- BGLB_MC varchar(50) NOT NULL,
- XG_BJ char(1) NOT NULL,
- LR_SJ date NULL,
- XG_SJ date NULL,
- LRRY_DM varchar(30) NULL,
- XGRY_DM varchar(30) NULL
- );
- alter table DM_DJ_BGLB
- add constraint DM_DJ_BGLB_5016258491 primary key (BGLB_DM);
-
- CREATE TABLE DM_DJ_BGXM (
- BGXM_DM char(8) NOT NULL,
- BGXM_MC varchar(50) NOT NULL,
- BGXM_JC varchar(30) NOT NULL,
- XG_BJ char(1) NOT NULL,
- BGDX_DM char(5) NOT NULL,
- SJB_LM varchar(30) NOT NULL,
- SJB_LLX char(2) NOT NULL,
- LR_SJ date NULL,
- XG_SJ date NULL,
- SJB_BJ char(2) NULL,
- SJDMB_MC varchar(30) NULL,
- SJDMB_ZJ varchar(30) NULL,
- SJDMB_ZJLX char(2) NULL,
- SJDMB_LMC varchar(30) NULL,
- LRRY_DM varchar(30) NULL,
- XGRY_DM varchar(30) NULL,
- JY_TJ varchar(20) NULL,
- dmTablefilter varchar(200) NULL
- );
- alter table DM_DJ_BGXM
- add constraint DM_DJ_BGXM_12021523471 primary key (BGXM_DM);
-
- CREATE TABLE DM_DJ_DJLX (
- DJLX_DM char(1) NOT NULL,
- DJLX_MC varchar(100) NOT NULL,
- DJLX_JC varchar(5) NULL,
- SWJG_DM varchar(20) NULL,
- XY_BJ char(1) NULL,
- XY_QSRQ date NULL,
- XY_ZZRQ date NULL,
- LRRY_DM varchar(30) NULL,
- LR_SJ date NULL,
- XGRY_DM varchar(30) NULL,
- XG_SJ date NULL,
- DJLX_LSH numeric(10,0) NOT NULL
- );
- alter table DM_DJ_DJLX
- add constraint DM_DJ_DJLX_1308124971 primary key (DJLX_LSH);
CREATE TABLE DM_DJ_BGLB (
BGLB_DM char(2) NOT NULL,
BGLB_MC varchar(50) NOT NULL,
XG_BJ char(1) NOT NULL,
LR_SJ date NULL,
XG_SJ date NULL,
LRRY_DM varchar(30) NULL,
XGRY_DM varchar(30) NULL
);
alter table DM_DJ_BGLB
add constraint DM_DJ_BGLB_5016258491 primary key (BGLB_DM);
CREATE TABLE DM_DJ_BGXM (
BGXM_DM char(8) NOT NULL,
BGXM_MC varchar(50) NOT NULL,
BGXM_JC varchar(30) NOT NULL,
XG_BJ char(1) NOT NULL,
BGDX_DM char(5) NOT NULL,
SJB_LM varchar(30) NOT NULL,
SJB_LLX char(2) NOT NULL,
LR_SJ date NULL,
XG_SJ date NULL,
SJB_BJ char(2) NULL,
SJDMB_MC varchar(30) NULL,
SJDMB_ZJ varchar(30) NULL,
SJDMB_ZJLX char(2) NULL,
SJDMB_LMC varchar(30) NULL,
LRRY_DM varchar(30) NULL,
XGRY_DM varchar(30) NULL,
JY_TJ varchar(20) NULL,
dmTablefilter varchar(200) NULL
);
alter table DM_DJ_BGXM
add constraint DM_DJ_BGXM_12021523471 primary key (BGXM_DM);
CREATE TABLE DM_DJ_DJLX (
DJLX_DM char(1) NOT NULL,
DJLX_MC varchar(100) NOT NULL,
DJLX_JC varchar(5) NULL,
SWJG_DM varchar(20) NULL,
XY_BJ char(1) NULL,
XY_QSRQ date NULL,
XY_ZZRQ date NULL,
LRRY_DM varchar(30) NULL,
LR_SJ date NULL,
XGRY_DM varchar(30) NULL,
XG_SJ date NULL,
DJLX_LSH numeric(10,0) NOT NULL
);
alter table DM_DJ_DJLX
add constraint DM_DJ_DJLX_1308124971 primary key (DJLX_LSH);
2010-12-31 langshao (资深程序员)
引用
谢谢您的转换。。。请问您有数据转换的中间件?有的话就给我个 或者 帮我把 上传的文件转换下吧。。。谢谢。。完事我给您结贴
我没有工具,手工改的。三千多行,改起来工作量不少,我还是说说改的方法吧。
1. 把 CREATE TABLE 后的 dbo. 去掉。
2. 把 datetime 替换成 date。
3. 把这些删了:
引用
LOCK DATAROWS
WITH exp_row_size = 0,
reservepagegap = 0,
identity_gap = 0
ON 'default'
4. 把 GO 换成分号 ; 。
5. 把 WITH max_rows_per_page = 0, reservepagegap = 0 删了。
6. 把 CONSTRAINT PK_T_XT_USER PRIMARY KEY NONCLUSTERED(USER_ID) 这样的移到 CREATE TABLE 之外,改成:
- alter table T_XT_USER
- add constraint PK_T_XT_USER primary key (USER_ID);
--我直接在create table 之内使用constraint pk_t_xt_user primary key(user_id);
7. 把 CONSTRAINT 前面一句的逗号去掉。 ----如果在表内定义中添加constraint,这个逗号就不用去掉了
8. 如果有 DJLX_LSH numeric(10,0) IDENTITY NOT NULL 这样的,直接把IDENTITY去掉就好。
9.text类型转换成clob类型s,image类型转换成blob类型.
用文本编辑器的替换,还是很快的,除了CONSTRAINT这一点。