Link to home
Start Free TrialLog in
Avatar of futureDBA
futureDBA

asked on

Oracle APEX and PL/SQL procedure to show image

Experts,

I need for a PL/SQL procedure to show an image in an HTML region when a date selector holds a certain value.

I am confused on how to go about this.

This is what I came up with so far.

DECLARE
vGood   varchar2(100)    := 'http://www.url.com/goodol.jpg';
vBad    varchar2(100)    := 'http://www.url.com/badeu.jpg';
BEGIN
IF :P0_DATE = '09-JAN-13' THEN htp.img ('vGOOD');
ELSE htp.img ('vBad');
END IF;
END
/

Open in new window

Avatar of Geert G
Geert G
Flag of Belgium image

make sure you have both parameters as a date

DECLARE
vGood   varchar2(100)    := 'http://www.url.com/goodol.jpg';
vBad    varchar2(100)    := 'http://www.url.com/badeu.jpg';
BEGIN
IF :P0_DATE = TO_DATE('09-JAN-13', 'DD-MMM-YY') THEN htp.img ('vGOOD');
ELSE htp.img ('vBad');
END IF;
END
/
The date format should be : TO_DATE('09-JAN-13', 'DD-MON-YY')  
not

TO_DATE('09-JAN-13', 'DD-MMM-YY')
ASKER CERTIFIED SOLUTION
Avatar of Sean Stuber
Sean Stuber

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I've requested that this question be deleted for the following reason:

Not enough information to confirm an answer.
Avatar of Sean Stuber
Sean Stuber

The example script includes a working example demonstrating the requested functionality.
I recommend http:#a38778624 for accept.