简单的pl/sql问题

djboy 2002-09-02 05:43:01
我写了一个触发器, 代码如下:
create or replace trigger set_TblUserInfo_no
before insert on tbluserinfo
for each row
declare
next_no number;
begin
select TblUserInfo_seq.NEXTVALUE into next_no from dual;
:NEW.ID: = next_no;
end set_TblUserInfo_no;

在pl/sql developer中运行总是提示:
:NEW.ID : = next_no; 有错, (PLS-00103)
请问这是什么错误, oracle中那里可以根据错误号查出错误信息?
多谢了.
...全文
81 17 打赏 收藏 转发到动态 举报
写回复
用AI写文章
17 条回复
切换为时间正序
请发表友善的回复…
发表回复
djboy 2002-09-02
  • 打赏
  • 举报
回复
谢了.
penitent 2002-09-02
  • 打赏
  • 举报
回复
oracle reference上有。还有oracle的很多电子文档中也有!
如oracle帮助
djboy 2002-09-02
  • 打赏
  • 举报
回复
to jlandzpa(ORA-00600)
PLS-00103的错误信息从哪里查? 我刚接触oracle.:(
penitent 2002-09-02
  • 打赏
  • 举报
回复
本来就是NextVal,那本书上说是NEXTVALUE ???
jlandzpa 2002-09-02
  • 打赏
  • 举报
回复
PLS-00103 found str but expected one of the following: str

Cause This error message is from the parser. It found a token (language element) that is inappropriate in this context.
Action Check previous tokens as well as the one given in the error message. The line and column numbers given in the error message refer to the end of the faulty language construct.

Copyright (C) 1998, Oracle Corporation
penitent 2002-09-02
  • 打赏
  • 举报
回复
PLS-00103: found str but expected one of the following: str
Cause: This error message is from the parser. It found a token (language element) that is inappropriate in this context.

Action: Check previous tokens as well as the one given in the error message. The line and column numbers given in the error message refer to the end of the faulty language construct.
djboy 2002-09-02
  • 打赏
  • 举报
回复
多谢大家, 我已经编译成功了, 上面的语句有2个错误:
1.:new.ID: = next_no; 正确的是 :new.ID := next_no;
2. TblUserInfo_seq.NEXTVALUE 正确的是 TblUserInfo_seq.Nextval
可见书上写的也不全对呀.:)
penitent 2002-09-02
  • 打赏
  • 举报
回复
PLS-00103
不好意思,我查错了,以上的错误大家都说了,
就是:=该连着写,我帮你查查PLS-00103
penitent 2002-09-02
  • 打赏
  • 举报
回复
PLS-00103
不好意思,我查错了,以上的错误大家都说了,
就是:=该连着写,我帮你查查PLS-00103
penitent 2002-09-02
  • 打赏
  • 举报
回复
ORA-00103: invalid network protocol; reserved for use by dispatchers
Cause: The network specified in Net8 CONNECT string is reserved for use by the dispatchers.

Action: Specify other network protocols in the CONNECT string.
你怎么会有这种错误???奇怪!
jlandzpa 2002-09-02
  • 打赏
  • 举报
回复
NEW.ID : = :next_no; 不对吧.
penitent 2002-09-02
  • 打赏
  • 举报
回复
NEW.ID : = :next_no;?????
to bzszp(SongZip),为什么要加:号。
另外: =要连着写,是一个符号

bzszp 2002-09-02
  • 打赏
  • 举报
回复
我怎么老掉东西,new前面的冒号
:NEW.ID : = :next_no;
yuanscar 2002-09-02
  • 打赏
  • 举报
回复
TblUserInfo_seq.NEXTVALUE可能还没有得到值
直接让next_no :=:new.TblUserInfo_seq试试看。
不知道是不是这样,你把表的字端列出来看看啊!
Michaelyfj 2002-09-02
  • 打赏
  • 举报
回复
......
begin
select TblUserInfo_seq.NEXTVALUE into next_no from dual;
:NEW.ID: = next_no;
end set_TblUserInfo_no;

改成:
......
begin
select TblUserInfo_seq.NEXTVALUE into next_no from dual;
:NEW.ID := next_no; --赋值是 :=, 而不是 : =
^^^^
end set_TblUserInfo_no;
bzszp 2002-09-02
  • 打赏
  • 举报
回复
NEW.ID : = :next_no;
jlandzpa 2002-09-02
  • 打赏
  • 举报
回复
:NEW.ID: = next_no; ------> :NEW.ID:= next_no;
内容概要:本文围绕基于三电平ANPC构网型逆变器的虚拟同步控制策略展开研究,重点探讨了其在Simulink环境下的仿真实现方法。研究聚焦于虚拟同步发电机(VSG)控制、双闭环控制及中点电位平衡控制等核心技术,旨在提升高渗透率新能源背景下逆变器的惯量支撑能力和电能质量。通过构建详细的系统模型,提出并优化控制策略,有效解决了三电平逆变器在动态响应、稳定性及中点电压波动等方面的挑战,增强了系统对复杂电网工况的适应能力。研究进一步结合VSG的虚拟惯量与阻尼特性,实现对电网频率波动的有效抑制,并通过双闭环结构提升电流跟踪精度与功率调节性能,同时引入中点电位平衡控制策略,确保多电平拓扑输出电压对称性与可靠性。; 适合人群:具备电力电子、自动控制或新能源发电相关背景,从事科研或工程开发的研发人员,尤其是关注构网型逆变器、虚拟同步技术及多电平拓扑控制的研究生与工程师。; 使用场景及目标:①应用于新能源并网系统中构网型逆变器的设计与仿真;②为提升电力系统稳定性提供虚拟同步控制方案;③实现三电平ANPC逆变器中点电位的有效平衡与动态性能优化; 阅读建议:建议结合Simulink仿真模型进行实践操作,重点关注控制策略的实现细节与参数整定过程,同时可参考文中提到的双闭环结构与VSG控制逻辑进行扩展研究。

17,134

社区成员

发帖
与我相关
我的任务
社区描述
Oracle开发相关技术讨论
社区管理员
  • 开发
  • Lucifer三思而后行
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧