Monday, December 7, 2009

Triggers

Centinul







You could look at the TABLE_NAME or COLUMN_NAME field of USER_TABLES / USER_TAB_COLUMNS in conjunction with the SEQUENCE_NAME of USER_SEQUENCES to see if you can decipher any standard naming scheme your colleague used.

Wednesday, December 2, 2009

Monday, September 21, 2009

Tuesday, September 15, 2009

Monday, September 14, 2009

Tree - Catch


Display tree revisiting after other tree page(s)


Without Tree in First Time



Saturday, August 29, 2009

Tuesday, August 18, 2009

Thursday, June 25, 2009

DB tables













Constrain with cascade for foreign key(S)

select SVR_TASR_SEQ.nextval into :new.TASR_ID from dual;

select SVR_SITR_SEQ.nextval into :new.SITR_ID from dual;

select SVR_ROOR_SEQ.nextval into :new.ROOR_ID from dual;

select SVR_DEVN_SEQ.nextval into :new.DEVN_ID from dual;

select SVR_DEV_SEQ.nextval into :new.DEV_ID from dual;

Steps TABLE, SEQUENCE, TRIGGER
Constraint: Primary, Foreign

Wednesday, June 17, 2009

Font Color




Codes script type="text/javascript">

var x = document.getElementsByTagName("SPAN");

var s;

if (x)

{

for (var i = 0; i <>

{

s = x[i];

if (s.style.color == "red" && s.style.fontWeight == "bold")

{

s.style.color = "blue";

}

}

}


























Font Color:
in region footer>>>
Begin script type="text/javascript">
var x = document.getElementsByTagName("SPAN");
var s;
if (x)
{
for (var i = 0; i < s =" x[i];" color ="=" fontweight ="=" color = "blue" type="text/javascript">
var x = document.getElementsByTagName("SPAN");
var s;
if (x)
{
for (var i = 0; i < s =" x[i];" color ="=" fontweight ="=" color = "blue">

root of Tree





UPDATE SVR_DEVICES
SET SURPLUS_DATE = SYSDATE
WHERE DEV_ID = :P3_DEV_ID;











I founded old way only:

Select DEV_ID + 20000 id,

ROOM + 10000 PID,

HOST_NAME name,

'f?p=&APP_ID.:6:&SESSION.::NO::P6_DEV_DEV_ID:'||dev_ID AS link,

null AS a1,

null AS a2

from SVR_DEVICES

UNION

Select ROOR_ID + 10000 id,

SITR_SITR_ID PID,

ROOM name,

null AS link,

null AS a1,

null AS a2

from SVR_ROOMs_RF

union

select 0 ID,

0 PID,

'All Cities' name,

null AS link,

null AS a1,

null AS a2

from SVR_SITES_RF where rownum = 1

UNION

select SITR_ID ID,

0 PID,

city name,

null AS link,

null AS a1,

null AS a2

from SVR_SITES_RF

order by name

Monday, June 15, 2009

Email:

A) created a page with region
B) insert Page Items and a button
C) Entered the following code in the PL/SQL page process area.
DECLARE
l_id number;

BEGIN
l_id := APEX_MAIL.SEND(
p_to => :P11_EMAIL,
p_from => :P11_FROM,
p_subj => :P11_SUBJECT,
p_body => :P11_BODY);

COMMIT;
END;

Info With Attahcment
To Apex Mail
More Info

make sense But Need to Test
DECLARE
l_id number;
BEGIN
l_id := APEX_MAIL.SEND(
p_to => 'email@host.com',
p_from => 'email2@host.com',
p_subj => 'TEST',
p_body => 'SOME TEXT HERE',
p_body_html => ' ');
apex_mail.push_queue;
COMMIT;
END;

also note APEX_MAIL.SEND as apposed to htmldb_MAIL.SEND and similar apex_mail.push_queue
and the p_body_html field

Wednesday, May 20, 2009

UpDateTime


display:block; width:75px;


DD-MON-YYYY"
" HH:MIPM


TO_CHAR(SYSDATE, 'DD-MON-YYYY');






Monday, May 18, 2009

Depending LOV’s in a generic way






LOV 102

Andy

1. Application item named: Get_Rooms
2. block to construct a list of item
3. JavaScript in HTML Header
4. HTML Form Element Attributes

********* Begin Get_Rooms : On Demand **********

select ROOM,ROOR_ID
from SVR_ROOMS_RF
where sitr_sitr_id = :TEMPORARY_ITEM)
…. rec.ROOR_id '">' rec.ROOM '');
********* End Get_Rooms : On Demand **********
********* Begin JavaScript in HTML Header**********

…..
htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=Get_Rooms',0);
get.add('TEMPORARY_ITEM',pThis.value);
gReturn = get.get('XML');
if(gReturn && l_Select){
…..

********* End JavaScript in HTML Header**********

*********** Begin HTML Form Element Attributes **********
onchange="get_AJAX_SELECT_XML(this,'P4_ROOM')"
*********** End HTML Form Element Attributes **********
ONCHANGE
Apex Cascading LOV's

Handling Depending LOV’s in a generic way

http://forums.oracle.com/forums/thread.jspa?threadID=400026
http://forums.oracle.com/forums/thread.jspa?messageID=1371958
http://htmldb.oracle.com/pls/otn/f?p=31517:42:1201664623903907:::::
http://htmldb.oracle.com/pls/otn/f?p=31517:1:1201664623903907::NO:::
http://forums.oracle.com/forums/thread.jspa?messageID=3416455&#3416455

Friday, May 15, 2009

Multiple Validations



for each button


Up Date Button2


Up Date Button1
#########################


************** CREATE ************
declare
icount number;
inum number;
begin
select count (SVR_EQUIPMENT.serial_number) into icount from SVR_EQUIPMENT
where serial_number = :p2_serial_number;
if
icount >0 then return 'Duplicate Number';
elsif
:p2_serial_number is null then return 'Serial Number cannot be Null';
end if;
inum:= to_number(:p2_serial_number);
exception
when others then return 'Must be numeric';
end;

************** UPDATE ************
declare
icount number;
inum number;
begin
select count (SVR_EQUIPMENT.serial_number) into icount from SVR_EQUIPMENT
where serial_number = :p2_serial_number
and equipment_id <> :p2_equipment_id;
if
icount >0 then return 'Duplicate Number';
elsif
:p2_serial_number is null then return 'Serial Number cannot be Null';
end if;
inum:= to_number(:p2_serial_number);
exception
when others then return 'Must be numeric';
end;
#######################

Before Modified

Informative