> R. Klemme wrote:
> > 
> > Hi all,
> > 
> > I can't seem to get this to work:
> > 
> > create dbproc XXX
> > as
> > var
> >   str VARCHAR(100);
> > begin
> >   set str = 'FOO;';
> >   execute 'drop dbproc CR_ADMIN.RR_' || str;
> >   stop($rc, $errmsg);
> > end;
> > 
> > Calling this SP results in a syntax error:
> > Syntax error or access violation;-3005 POS(1) Invalid SQL statement.
> > 
> > MaxDB version is 7.5.0
> > 
> > The error disappears if I comment the "stop" line so I assume it's a
> > message
> > resulting from the "execute".  Anything I'm doing wrong here?
> 
> As you can see in the reference manual
>
http://dev.mysql.com/doc/maxdb/en/a7/41ee2c605911d3a98800a0c9449261/frameset.htm
> drop dbproc is (as most DDL) NOT allowed in dbprocs.

1. I don't use a "drop dbproc" directly, but I use "execute <string>".

2. I can do "execute 'drop table foo'" without errors (and the table is in
fact deleted and it's not a temp table).

3. It's not listed under limitations that this is not possible.

Could you please clarify this?  Thanks a lot!

> > Btw: stored procedures do not show up in SYS.CAT and SYS.ALL_OBJECTS. 
> Is
> > there any way to determine all stored procedures of a user
> > programmatically?
> 
> Select * from DOMAIN.DBPROCEDURES 
> may help as you can find out when checking the available systemtables:
>
http://dev.mysql.com/doc/maxdb/en/9c/b33d40425326439dfc0366a8dcbf55/frameset.htm

Thanks for that hint!

Kind regards

robert

-- 
+++ Jetzt WLAN-Router f�r alle DSL-Einsteiger und Wechsler +++
GMX DSL-Powertarife zudem 3 Monate gratis* http://www.gmx.net/dsl


-- 
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to