Search This Blog

Showing posts with label Oracle/PLSQL. Show all posts
Showing posts with label Oracle/PLSQL. Show all posts

Saturday, May 15, 2010

Get current day , month, year Oracle

Oracle > Date Time > Get current day , month, year Oracle


select to_number(to_char(sysdate,'dd')) day,to_number(to_char(sysdate,'mm')) month,to_number(to_char(sysdate,'yyyy')) year from dual;









Thursday, February 4, 2010

First, last day of the month Oracle

Oracle > Date & Time > First day and last day of the month Oracle


SELECT (trunc(sysdate, 'mm')) first_day FROM dual;
SELECT last_day(trunc(sysdate)) last_date FROM dual;
--result
FIRST_DAY
-----------
12/1/2010

LAST_DATE
-----------
12/31/2010

Tuesday, January 19, 2010

FRM-40654: Record has been updated by another user

Oracle > dml_data_target_name

FRM-40654: Record has been updated by another user

The case that I had was i changed the query of 1 database block dynamically use set_block_property(’BLOCK1′,Query_Data_Source_Name,’TABLE_X’). This BLOCK1 previously assign to TABLE_A. TABLE_X and TABLE_A has same fields structure.


FRM-40654

As summary, my form blocks condition were like this :
BLOCK1 = TABLE_A

Solution:

use set_block_property on pre_query trigger to change the query_data_source_name to TABLE_X.

Everything looks fine when i load the form, but when i tried to change the field value, it gave me this form error FRM-40654. I search around in Google and only can found several peoples face the same frm-40654 but in different situation.


set_block_property(’BLOCK1′,dml_data_target_name,’TABLE_X’)








Monday, January 4, 2010

Remove list items Oracle Forms

Oracle > Forms > List > Remove

How to remove items from  Oracle Forms list?

"Ctrl + Shift + >" - add list element.
"Ctrl + Shift + <" - remove list element.