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.
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
/
The date format should be : TO_DATE('09-JAN-13', 'DD-MON-YY')
not
TO_DATE('09-JAN-13', 'DD-MMM-YY')
not
TO_DATE('09-JAN-13', 'DD-MMM-YY')
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I've requested that this question be deleted for the following reason:
Not enough information to confirm an answer.
Not enough information to confirm an answer.
The example script includes a working example demonstrating the requested functionality.
I recommend http:#a38778624 for accept.
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
/