We would like to move bulk processing and business rules to the server, but
have great difficulty with even getting the basics to work.
Currently installed live database is version 7.3.0.25 on Linux and our
development server is Windows 2000 and the same version.
When defining CREATE DBPROC from SQL Studio as follows:
-------------------------------------------------------
//!Create DBPROC Script 1
CREATE DBPROC "DBA"."DO1" AS
INSERT INTO "DBA"."TEST2"
SELECT * FROM "DBA"."TEST1";
//!End Create DBPROC
Reports the following on 7.3.0.25
Error: "-5015 Syntax error or access violation;-5015 POS(20) Missing
keyword:IN. Position 20" . (the dot between owner and tablename???)
The documentation states that formal_parameters are optional.
We also cannot CREATE TABLE unless it is a TEMP table it seems (from within
DBPROC).
Then I try:
------------
//!Create DBPROC Script 2
CREATE DBPROC "DBA"."DO2" (IN dummy1 INT) AS
INSERT INTO "DBA"."TEST2"
SELECT * from "DBA"."TEST1";
//!End Create DBPROC
And still the same error occurs.
Test Tables and Data Script:
----------------------------
//!Start of Create Tables Script
CREATE TABLE "DBA"."TEST1"
(
"SYSID" Integer DEFAULT SERIAL (1),
"NAME" Varchar (30) ASCII UNIQUE,
"TELNO" Varchar (20) ASCII,
PRIMARY KEY ("SYSID")
)
//
CREATE TABLE "DBA"."TEST2" LIKE "DBA"."TEST1"
//!End of Create Tables Script
//!Create test data in TEST1
INSERT INTO "DBA"."TEST1" (NAME,TELNO) VALUES('Person1','1111')
//
INSERT INTO "DBA"."TEST1" (NAME,TELNO) VALUES('Person2','2222')
//
INSERT INTO "DBA"."TEST1" (NAME,TELNO) VALUES('Person3','3333')
//!End of Create data
Ideally we would like the following type of DBPROC:
---------------------------------------------------
//!Create DBPROC Script 3
CREATE DBPROC "DBA"."DO3" AS
INSERT INTO "DBA"."TEST2" (NAME,TELNO)
SELECT NAME,TELNO FROM "DBA"."TEST1";
//!End Create DBPROC
QUESTION 1:
-----------
What exactly can we do with DBPROC at this time on 7.3.0.25 (and maybe in 7.4
when it is final), since not all usual SQL92 DML functions seem to be available
yet?
QUESTION 2:
-----------
Are there work arounds available for 7.3.0.25 that will also work in 7.4+.
Thank you
Marius Snyman
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general