SQL 错误提示: ORA-00907: 缺失右括号,00907. 00000 - "missing right parenthesis" 请大神帮忙指点 30
createtabledyf_statsset(idintIDENTITY(1,1),minsecintnotnull,maxsecintnotnull,dayfloat...
create table dyf_statsset
( id int IDENTITY(1,1),
minsec int not null,
maxsec int not null,
day float not null default 0,
gongsi nvarchar(20)
)
go
create table dyf_statsedit
(
id int IDENTITY(1,1),
cuid int not null,
kouchu float not null,
beizhu nvarchar(4000) not null
)
go
create view dyf_statsview as (
select a.workflowid,b.requestmark,c.nodename,b.requestid,b.requestname,b.currentnodetype,
(b.createdate+' '+b.createtime) as createdatetime,b.creater,a.userid,
(a.receivedate+' '+a.receivetime) as receivedatetime,
(case when a.isremark<>0 then (a.operatedate+' '+a.operatetime)
else convert(varchar,GETDATE(),120) end) as operatedatetime,
a.id,
(select hr1.departmentid from HrmResource hr1 where hr1.id=b.creater) as cdept,
(select hr1.subcompanyid1 from HrmResource hr1 where hr1.id=b.creater) as csubcom,
(select hr1.departmentid from HrmResource hr1 where hr1.id=a.userid) as udept,
(select hr1.subcompanyid1 from HrmResource hr1 where hr1.id=a.userid) as usubcom,
convert(varchar,GETDATE(),120) as nowdatetime,
a.isremark,
a.groupdetailid
from workflow_currentoperator a,workflow_requestbase b,workflow_nodebase c
where a.requestid=b.requestid
and c.id=a.nodeid
and a.workflowid<>1
and isstart<>1
and isend<>1
)
在sql developer上执行时,请示:
命令出错, 行: 3 列: 13
错误报告:
SQL 错误: ORA-00907: 缺失右括号
00907. 00000 - "missing right parenthesis"
*Cause:
*Action:
跪求大神帮忙看一下,是那里的问题。谢谢! 展开
( id int IDENTITY(1,1),
minsec int not null,
maxsec int not null,
day float not null default 0,
gongsi nvarchar(20)
)
go
create table dyf_statsedit
(
id int IDENTITY(1,1),
cuid int not null,
kouchu float not null,
beizhu nvarchar(4000) not null
)
go
create view dyf_statsview as (
select a.workflowid,b.requestmark,c.nodename,b.requestid,b.requestname,b.currentnodetype,
(b.createdate+' '+b.createtime) as createdatetime,b.creater,a.userid,
(a.receivedate+' '+a.receivetime) as receivedatetime,
(case when a.isremark<>0 then (a.operatedate+' '+a.operatetime)
else convert(varchar,GETDATE(),120) end) as operatedatetime,
a.id,
(select hr1.departmentid from HrmResource hr1 where hr1.id=b.creater) as cdept,
(select hr1.subcompanyid1 from HrmResource hr1 where hr1.id=b.creater) as csubcom,
(select hr1.departmentid from HrmResource hr1 where hr1.id=a.userid) as udept,
(select hr1.subcompanyid1 from HrmResource hr1 where hr1.id=a.userid) as usubcom,
convert(varchar,GETDATE(),120) as nowdatetime,
a.isremark,
a.groupdetailid
from workflow_currentoperator a,workflow_requestbase b,workflow_nodebase c
where a.requestid=b.requestid
and c.id=a.nodeid
and a.workflowid<>1
and isstart<>1
and isend<>1
)
在sql developer上执行时,请示:
命令出错, 行: 3 列: 13
错误报告:
SQL 错误: ORA-00907: 缺失右括号
00907. 00000 - "missing right parenthesis"
*Cause:
*Action:
跪求大神帮忙看一下,是那里的问题。谢谢! 展开
1个回答
展开全部
你这是从哪复制的sqlserver的语句,然后用到了oracle上
你这个,你还是找找oracle语句怎么写吧
你这个,你还是找找oracle语句怎么写吧
追问
请问这个要改成oracle语句,你能帮忙不。
追答
create table dyf_statsset
(id int primary key,--oracle没有这种自增,需要你创建序列+触发器来实现,具体可以找例子
minsec int not null,
maxsec int not null,
day float default 0 not null,
gongsi nvarchar2(20));--没有nvarchar类型,只有nvarchar2类型
create table dyf_statsedit
(
id int primary key, --同上
cuid int not null,
kouchu float not null,
beizhu nvarchar2(2000) not null --长度达不到4000,用2000吧
);
那个视图我改不了,你那些表我都不知道哪来的,上边两句分别执行
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询