SERPland Oracle, PL/SQL, PHP, Autos, Bungalow-Hotels and more …

28Dec/060

Oracle Forms: How to change an item to bold during runtime


Dynamically changing a Oracle Forms Item from "normal" to bold:

SET_ITEM_PROPERTY('block.item', FONT_WEIGHT, FONT_BOLD);
SET_ITEM_PROPERTY('block.item', CURRENT_ROW_FONT_WEIGHT, FONT_BOLD);

That's it.

13Dec/061

CASE expression in Oracle SQL statement


Let's think we write a select statement and would like to DECODE (on Oracle database) on a column:

DECODE(bew.bewart_tid, 'GDL', 'Grenzüberschr. Dienstl. aus EWR Raum' ,bewart.bezeichnung) col_alias

Now you'd like to decode an additional value on the same column. This could result in a not-well-readable DECODE expression.
Better you try to use the CASE expression:

, case when bew.bewart_tid = 'GDL' then 'Grenzüberschr. Dienstl. aus EWR Raum'
when bew.bewart_tid = 'GDLA' then 'Grenzüberschr. Dienstl. aus EWR Raum'
else bewart.bezeichnung
end col_alias

This is a well-formed and well-readable SQL statement.