on 06-22-2011 1:42 PM
Hi
is there any statement in MaxDB SQL (language), that allows executing another SQL statement written as a text? Something like EXEC in MS SQL...
For example: I'm trying to write a cursor, that makes UPDATE STATISTICS for several tables...
CREATE PROCEDURE ZZZTEST as
VAR SCHEMANAME VARCHAR(500); TABLENAME VARCHAR(500);
DECLARE c1 CURSOR FOR SELECT TOP 20 SCHEMANAME, TABLENAME from DOMAIN.TABLES;
FETCH NEXT c1 INTO :SCHEMANAME, :TABLENAME;
WHILE ($rc = 0) DO
BEGIN
****need to execute UPDATE STAT SCHEMANAME.TABLENAME ESTIMATE****
FETCH NEXT c1 INTO :SCHEMANAME, :TABLENAME;
END;
CLOSE c1;
Thanks for your answers
Martin
Hi Martin,
forgot to mention that the syntax elements can be found here: [http://maxdb.sap.com/doc/7_8/45/51f0636a4f3bdbe10000000a1553f7/frameset.htm].
Steffen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Martin,
EXECUTE '<COMMAND>'
will do the job.
Regards,
Steffen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.