|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
RE : dbproc-problems
From: Marc-Olivier Meunier (momeunier
bklink.com)
Date: Tue Jul 22 2003 - 09:06:31 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> I have another question to the out-parameter of a dbproc:
> My first idea was, to write a dbproc like:
> CREATE DBPROC MONATSNAME (IN MONATSNUMMER INTEGER, OUT MONAT
> VARCHAR(20)) AS CASE WHEN MONATSNUMMER = 1 THEN SET MONAT =
> 'Januar'; WHEN MONATSNUMMER = 2 THEN SET MONAT = 'Februar';
> WHEN MONATSNUMMER = 3 THEN SET MONAT = 'März'; WHEN
> MONATSNUMMER = 4 THEN SET MONAT = 'April'; WHEN MONATSNUMMER
> = 5 THEN SET MONAT = 'Mai'; WHEN MONATSNUMMER = 6 THEN SET
> MONAT = 'Juni'; WHEN MONATSNUMMER = 7 THEN SET MONAT =
> 'Juli'; WHEN MONATSNUMMER = 8 THEN SET MONAT = 'August'; WHEN
> MONATSNUMMER = 9 THEN SET MONAT = 'September'; WHEN
> MONATSNUMMER = 10 THEN SET MONAT = 'Oktober'; WHEN
> MONATSNUMMER = 11 THEN SET MONAT = 'November'; WHEN
> MONATSNUMMER = 12 THEN SET MONAT = 'Dezember'; ELSE STOP
> (-29000, 'keine gültige Monatsziffer'); END CASE; This was
> the try to get a german monthname identified by the number of
> the month. But when i try to call this dbproc with call
> MONATSNAME(4) i get the error too few parameters. So i think,
> that the database expected in value for the out parameter,
> but with value should i send to the database?? i tried call
> MONATSNAME(4, '') and call MONATSNAME(4, NULL) and call
> MONATSNAME(4, 'April') always without any success. Where is
> in this case my failure??
>
Try this :
VAR YOUR_VARIABLE VARCHAR(32) ;
CALL MONATSNAME(4 , YOUR_VARIABLE) ;
_______________________________________________
sapdb.general mailing list
sapdb.general
listserv.sap.com
http://listserv.sap.com/mailman/listinfo/sapdb.general
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]