---
title: "oracle EXECUTE IMMEDIATE ora-00911"
author: "MicroJoey"
date: "2011-08-14T10:15:59Z"
tags: []
categories: ["数据库"]
slug: "oracle-execute-immediate-ora-00911"
draft: false
lastmod: "2011-08-14T10:15:59Z"
id: 1148863
url: "https://microjoey.iteye.com/blog/1148863"
---

I get an error when I try to execute this procedure, which is part of a package :ERROR at line 1:
ORA-00911: invalid character
ORA-06512: at "SA.GET_PBS", line 41
ORA-06512: at line 1

line 41 is denoted with two stars, could anyone please give me a clue as to what the invalid character could be. when I run the dynamic string on its own it seems fine, but its somehow not compiling when i try to run the proc




```java
yours: ''Dott'');'; 

corrrect: ''Dott'')'; 

execute immediate statements must not have a ; at the end of the string 
to be executed iirc. 

```