Moro wrote :

>Hi!

>Last days I just experimented a litte bit with DBPROCs. Is it possible
>to use dbprocs for checking plausibility (Is the person full age? | Is
>the value a bigger than x? ...) only using SAPDB PL/SQL and without
>touching any table, view etc.? It would be ok to get only 0/1 as return
>value.

>Thanks!

>moro

You can use db-procedures for constraint checking without touching any table. The 
return
value must be an output parameter of the procedure because db-functions are not yet
available. Example :

create dbproc CheckValueGreater100 (in value integer, out isOk boolean) as
if value > 100
then
  isOk = true
else
  isOk = false;

But please note that it isn't possible to use such db-procedures in any insert or
update statement. I therefore might be better to implement constraint checking
at the client site using the client host language instead of db-procedure calls
to the server site.   

Regards
Thomas

-- 
Thomas Anhaus
SAP DB, SAP Labs Berlin
[EMAIL PROTECTED]
http://www.sapdb.org/
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general


_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to