Re: PLS-00103 Encountered the symbol CREATE
Date: Wed, 22 Oct 2008 10:15:41 -0700 (PDT)
On Oct 22, 2:26 am, NGry..._at_gmail.com wrote:
> Please help,
> I amd trying to create a script for patching the database.
> the script works with INSERT or SELECT, but when i try to execute a
> package (*pkb). I get an error: "PLS-00103 Encountered the symbol
> CREATE when expecting on of the following: begin ...."
> The logic is like this
> varable ...
> declare ...
> Select c INTO a FROM test_table
> if :a=:b then
> @PG_TEST.pkb; (if in place of pkb i have simple script with INSERT or
> SELECT there are no problems)
> insert into test_table values((select max(id) from test_table) + 1,
> end if;
> Exception when others then
> rollback work;
> Please help, What i am doing wrong?
> Thank you in advance.
You might look at how Oracle does things like catalog.sql and the scripts for installing statspack, for example. Not always the best or brightest ways to do things, but at least it can get you going. Then you might even come up with better ways to do things like check if things are already patched, or whether everything worked as planned, since you know your patch requirements.
You probably don't want to get too fancy with patching, it can take on a life of its own. You want to make it simple and obvious for others to run and fix. It may make sense to not allow normal operations when patching, though I've seen it be desirable to minimize downtime in a complicated upgrade.
-- @home.com is bogus. Why does google think I'm interested in sponsored links... in Japanese?Received on Wed Oct 22 2008 - 12:15:41 CDT