how to use decode for a column of a datablock [message #591327] |
Fri, 26 July 2013 07:00 |
|
oraclehi
Messages: 41 Registered: July 2012 Location: India
|
Member |
|
|
hello
i want to decode a column(aan_status) of a datablock based on table. the column have value in the form of 0 and 1, and i want to display this value as yes(0) or no(1) on my oracle form. how can i do this and where should i put my code???
i tried this by code:
set_block_property('aan_occupant_vu', DEFAULT_WHERE, qry1);
go_block('aan_occupant_vu');
clear_block(no_validate);
SYNCHRONIZE;
execute_query;
if :AAN_OCCUPANT_VU.aan_status= '0' then
=:AAN_OCCUPANT_VU.aan_status:;
else
:AAN_OCCUPANT_VU.aan_status:='NO';
end if;
but if else part of my code is not working, as i got the data still in 0 and 1 format, not in 'YES' or 'NO' format.
Thanks.
|
|
|
|
|
|
|
|
|
|