In Klausel in Proceure
Hallo Ich habe ein Problem mit einer Parametrisierten IN Klausl in einer Procedur.
Mein Code:
DROP PROCEDURE IF EXISTS CheckDate;
CREATE PROCEDURE `CheckDate`(p1 date, p2 Date,kst CHAR(20))
Begin
Truncate HEAP_SAPAbweichung;
WHILE p1 <= p2 DO
CALL SAPDISPOABW(Date_Format(p1,'%d_%m_%Y'),p1);
SET p1 = DATE_ADD(p1, INTERVAL 1 DAY);
END WHILE;
Select * from HEAP_SAPAbweichung where K_ID in(kst);
end;
Call Checkdate('2016/04/25','2016/04/30','7800, 4551')
...
Jetz ist das Problem das er den kst Parameter nicht richtig verarbeitet.
Ich Bekomme nur Ergebnisse zur Kostenstelle 7800. Die 4551 wird Ignoriert.
Er verabeitet immer nur die erste Zahl in dem Parameter.
Hat einer eine Idee was ich da falsch mache?
Gruß
Markus
Subject
Views
Written By
Posted
In Klausel in Proceure
1144
May 04, 2016 02:15AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.