Hi,

I wrote the following dbproc:
create dbproc Tagesansicht (in monat smallint, in hotline smallint, in spaltea 
varchar(30) ) returns cursor as
$cursor = 'cs_Tagesansicht';
declare :$cursor CURSOR FOR 
SELECT Left("Tag",10) AS "Datum",  :spaltea , "Belegung", YEAR("Tag") AS "kj" FROM 
"ROOT"."1_4_Calls_KNL" where MONTH("Tag") = :monat AND "Hotline_ID" = :hotline ORDER 
BY "Tag";

As you can see, spaltea is an paramter iwth the name of a column needed for the 
sql-query. The table "1_4_Calls_KNL" is declared so:

CREATE TABLE "ROOT"."1_4_Calls_KNL"
(
        "Tag"               Timestamp,
        "KC_ID"               Integer,
        "Hotline_ID"               Integer,
        "Belegung"               Float (16),
        "Calls"               Float (16),
        "Calls_E20"               Float (16),
        "Fore"               Float (16)
)

If I start the dbproc with CALL Tagesansicht (4, 1, "Calls_E20"); in the dbvisualizer 
i�ve get the error Constant must be compatible with column type and length. So there 
must be a failure in the dbproc. But how can I change the column of an sql-query in an 
dbproc??

Thanks and greetings,
Andreas
______________________________________________________________________________
UNICEF bittet um Spenden fur die Kinder im Irak! Hier online an
UNICEF spenden: https://spenden.web.de/unicef/special/?mc=021101

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

Reply via email to