exeption ORA-00907: missing right parenthesis
exeption ORA-00907: missing right parenthesis
CreationTime--2018年8月16日11点11分
Author:Marydon
1.情景展示
oracle存储过程 动态sql调用,调用失败:

2.原因分析
在oracl数据库中,ddl表示数据库定义语言,即我们平常使用的sql语句,声明的sql语句可以直接使用拼接字符串进行拼接;
dml表示数据操纵语言,声明的sql语句不能再用管道符||来动态拼接变量。
3.解决方案
execute immediate属于dml,dml使用sql的规则如下:
声明sql语句
字符串拼接变量时,变量要使用占位符来代替,格式为 ":" + "名字",名字随意
调用sql语句
使用"using"来传递变量,代替占位符,格式为 "using var1,var2,..."

exeption ORA-00907: missing right parenthesis的更多相关文章
- ORA-00906 missing left parenthesis括号
Oracle 建表报错:ORA-00906 missing left parenthesis括号 建表语句:create table test(id char,name varchar(1),s ...
- Ora-00906:missing left parenthesis
问题描述 Ora-00906:missing left parenthesis 问题原因 varchar和varchar2 必须指定长度,不然会报错
- plsql导入cvs 时提示missing right parenthesis
删除自动生成的时间格式值,如:SQL function框里自动生成的值
- SQL[Err]ORA-00XXX: missing 相关
1.[Err]ORA-00936: missing expression 造成这个错误的原因是:选取的最后一个字段与from之间有逗号 解决方法:将字段与from之间的逗号去掉. 2.[Err] OR ...
- exception ORA-00923: FROM keyword not found where expected
exception ORA-00923: FROM keyword not found where expected CreationTime--2018年8月16日10点41分 Author:M ...
- oracle_fdw安装及使用(无法访问oracle存储过程等对象)
通过oracle_fdw可以访问oracle中的一些表和视图,也可以进行修改,尤其是给比较复杂的系统使用非常方便. (但不能使用oracle_fdw来访问oracle的存储过程.包.函数.序列等对象) ...
- Sql-oracle and sqlserver differences
1.string contact operator Sqlserver use + or contact(sqlserver 2012) In oracle, you can also use con ...
- 注意字段类型是varchar2的时候是需要加长度的
注意字段类型是varchar2的时候是需要加长度的,如下: alter table a add username varchar2(32); 注意以下是错误的: alter table a add u ...
- Regular Expressions --正则表达式官方教程
http://docs.oracle.com/javase/tutorial/essential/regex/index.html This lesson explains how to use th ...
随机推荐
- ARCGIS将WGS84坐标投影到高斯平面
将WGS84坐标投影到平面,一般採用的是UTM(通用横轴莫卡托投影).该方式多用于美国地区,而我国多用北京54和西安80高斯克吕格投影坐标.假如我们想把影像採用高斯克吕格投影到在平面上,而ARCGIS ...
- table固定首行(一)
<html> <head> <title>Untitled Document</title> <meta http-equiv="Con ...
- NLP国内研究方向机构导师
基础研究 词法与句法分析:李正华.陈文亮.张民(苏州大学) 语义分析:周国栋.李军辉(苏州大学) 篇章分析:王厚峰.李素建(北京大学) 语言认知模型:王少楠,宗成庆(中科院自动化研究所) 语言表示与深 ...
- mac下使用brew安装java等应用
可以使用brew安装很多应用,比如java,idea,iterms,sublime brew tap caskroom/versions 将会安装新的brew仓库源brew cask install ...
- Unix/Linux环境C编程新手教程(30) 字符串操作那些事儿
函数介绍 rindex(查找字符串中最后一个出现的指定字符) 相关函数 index,memchr,strchr,strrchr 表头文件 #include<string.h> 定义函数 c ...
- MongoDB:如何正常关闭服务(转)
原文链接:MongoDB:关闭服务 MongoDB 提供几种关闭服务的命令,具体为以下: 一 使用 Crtl+C 关闭 [mongo@redhatB data]$ mongod --dbpath=/ ...
- [10] 圆管(Pipe)图形的生成算法
顶点数据的生成 bool YfBuildPipeVertices ( Yreal radius, Yreal assistRadius, Yreal height, Yuint slices, YeO ...
- Informatica 常用组件Lookup之十 创建查找转换
在 Mapping Designer 中选择"转换-创建".选择查找转换.输入转换名称.查找转换的命名惯例是 LKP_TransformationName.单击"确定&q ...
- 第十八章 springboot + thymeleaf
代码结构: 1.ThymeleafController package com.xxx.firstboot.web; import org.springframework.stereotype.Con ...
- asm rebalance 原理
详见原文博客链接地址: asm rebalance 原理