Hi,
I can't find the missing thing in this code. "05-MAY-08" is in the table but, ( CURSOR_TARIH%FOUND )
never returns TRUE. When i do manuel query it is ok.
Thanks
create or replace
PROCEDURE A_SIPARIS_EKLE_SP
IS
CURSOR CURSOR_TARIH IS
SELECT TARIH FROM A_ACCOUNT WHERE TARIH = to_date('05-MAY-08', 'DD-MM-YY');
BEGIN
OPEN CURSOR_TARIH;
INSERT INTO A_SIPARIS (MID,STATUS) VALUES (1, 'NO');
IF ( CURSOR_TARIH%FOUND ) THEN
UPDATE A_ACCOUNT SET PRICE = '10' WHERE TARIH = to_date('05-MAY-08', 'DD-MM-YY');
ELSE
INSERT INTO A_ACCOUNT( TARIH, PRICE) values ( SYSDATE, '1' );
END IF;
COMMIT;
CLOSE CURSOR_TARIH;
END;