code is fine -- it's probably the way you're running it. i would assume that
[Quoted] you've got all this code in the SQL buffer and then attempt to execute it as
if it is a single SQL statement -- it's actually two SQL statements, so you
[Quoted] need to save it to a named script file (not the default afiedt.buf that gets
created when you do a plain EDIT in SQL*Plus) and then use '_at_filename' or
[Quoted] 'start filename' to execute the script

also: user varchar2 instead of varchar -- oracle's been saying the following
[Quoted] since v7 or v6:

"VARCHAR Datatype
"The VARCHAR datatype is currently synonymous with the VARCHAR2 datatype.
[Quoted] Oracle recommends that you use VARCHAR2 rather than VARCHAR. In future
releases, VARCHAR might be defined as a separate datatype used for
variable-length
character strings compared with different comparison semantics."