Md. Quium Hossain who I'm Oracle DBA & APEX Developer. All-rounder in building small, medium, and enterprise applications. Extensive knowledge in various areas of web-driven applications in Back-end (PL/SQL, SQL, Java), Front-end (Oracle APEX, Oracle Forms, Oracle Reports, HTML, JavaScript, CSS, jQuery, OracleJET, ReactJS), RESTful APIs, Third-party library integrations (Apex Office Print (AOP), Payment Gateways, SMS, Syncfusion, HighCharts) and APEX Plugins (HighChart, StarRating)
Saturday, October 30, 2021
ORA-01476: divisor is equal to zero
Tuesday, October 26, 2021
Difference between row_number(), rank() and dense_rank() window functions in Oracle SQL
-- will only be visible when there were duplicates.
-- row_number gives consecutive ranking even with duplicate
-- rank and dense_rank give the same ranking but rank has a jump
-- while dense_rank doesn't have jump
select e.*,
row_number() over (order by salary desc) row_number,
rank() over (order by salary desc) rank,
dense_rank() over (order by salary desc) as dense_rank
from #Employee e
Monday, October 25, 2021
ICON STATUS
(city_name varchar2(50),
status1 varchar2(2),
status2 varchar2(2),
status3 varchar2(2)
)
insert into city_statuses
values('Dhaka','1','0','-1')
insert into city_statuses
values('Dhaka','1','0','-1')
insert into city_statuses
values('Dhaka','1','0','-1')
insert into city_statuses
values('Dhaka','1','0','-1')
insert into city_statuses
values('Dhaka','1','0','-1')
insert into city_statuses
values('Dhaka','1','0','-1')
insert into city_statuses
values('Dhaka','1','0','-1')
insert into city_statuses
values('Dhaka','-1','1','1')
insert into city_statuses
values('Dhaka','1','0','-1')
insert into city_statuses
values('Dhaka','1','0','-1')
insert into city_statuses
values('BARISHAL','1','0','-1')
insert into city_statuses
values('BARISHAL','1','0','-1')
insert into city_statuses
values('BARISHAL','1','0','-1')
insert into city_statuses
values('BARISHAL','1','0','-1')
insert into city_statuses
values('BARISHAL','1','0','-1')
insert into city_statuses
values('BARISHAL','1','0','-1')
insert into city_statuses
values('BARISHAL','1','0','-1')
insert into city_statuses
values('BARISHAL','-1','1','1')
insert into city_statuses
values('BARISHAL','1','0','-1')
insert into city_statuses
values('BARISHAL','1','0','-1')
For the icons and modifiers, I used:
- Success: fa-check-circle-o u-success-text
- Warning: fa-exclamation-triangle u-warning-text
- Error: fa-exception u-danger-text
select city_name,
status1,
status2,
status3,
case status1
when '1' then 'fa-check-circle-o u-success-text'
when '0' then 'fa-exclamation-triangle u-warning-text'
when '-1' then 'fa-exception u-danger-text'
end status1_icon,
case status1
when '1' then 'OK'
when '0' then 'Warning'
when '-1' then 'Danger'
end status1_description,
case status2
when '1' then 'fa-check-circle-o u-success-text'
when '0' then 'fa-exclamation-triangle u-warning-text'
when '-1' then 'fa-exception u-danger-text'
end status2_icon,
case status2
when '1' then 'OK'
when '0' then 'Warning'
when '-1' then 'Danger'
end status2_description,
case status3
when '1' then 'fa-check-circle-o u-success-text'
when '0' then 'fa-exclamation-triangle u-warning-text'
when '-1' then 'fa-exception u-danger-text'
end status3_icon,
case status3
when '1' then 'OK'
when '0' then 'Warning'
when '-1' then 'Danger'
end status3_description
from city_statuses
Then, for the columns STATUS1, STATUS2 and STATUS3, in Page Designer I changed the property HTML Expression to:
<span class="fa #STATUS1_ICON#" title="#STATUS1_DESCRIPTION#"></span>
APEX Workspace Activity Logs
select apex_user as who
,application_id||':'||page_id as what ,view_date as when ,elapsed_time as how_long ,page_view_type as why ,request_value as more_why from apex_workspace_activity_log where application_id >= 4000 and apex_user != 'nobody'
Thursday, October 14, 2021
Get records with max value for each group of grouped SQL
cf$_recovery_officer recovery_officer,
cf$_recovery_officer_name recovery_officer_name,
cf$_recovery_zone recovery_zone_code,
cf$_recovery_zone_name recovery_zone_name
FROM c_recovery_officer_history_clv t1
INNER JOIN
(
SELECT cf$_order_no order_no, MAX(ROWID) AS MAX_ROWID
FROM c_recovery_officer_history_clv
GROUP BY cf$_order_no
) t2
ON cf$_order_no = t2.order_no AND t1.ROWID = t2.MAX_ROWID
if an Item Value Changed then check message in Oracle Apex
-- page on page load Daynamic Action
if (apex.item("P10_SAL").isChanged()) {
apex.message.alert('You modified the salary, please verify again!');
}
Wednesday, October 13, 2021
Set/Convert an Item Value to Upper Case & Lower Case in Oracle Apex
--UpperCase
style="text-transform: uppercase;" onKeyUp="this.value=this.value.toUpperCase();"
--LowerCase
Highlight Item on Focus in Oracle Apex
ROUND function
Monday, October 11, 2021
ORACLE SQL | Find Number between two values, odd, even, number is odd or even
select '&START_NUM' + level - 1 "Number"
from dual
connect by level <= '&END_NUM' - '&START_NUM' + 1
ORACLE APEX | Apex URL Syntax
Anyhow, this is an Oracle related blog, and I wanted to share an idea to remember the Apex URL syntax of:
Most of the time I remember the order fairly well off the top of my head, though sometimes
How to install and configure Oracle Apex 24.1 with ORDS 22, Tomcat 9 and Jasper Report 7 on Oracle Linux 8.10
#########################Install Oracle APEX 24.1################################ ----------------------------------------------------...
-
# Report Column (only column): 1. Column Formatting > HTML Expression <span style="display:block; width: 200px"> #...
-
Installing Oracle Forms and Reports 12c on Windows 10 64 Bit. Hardware used for this installation is · Intel i3-2370M CPU · ...
-
when open forms builder then errors FRM-91129: fatal error: no value specified for required environment variable FORMS_BUILDER_CLASSPATH a...
-
---------------------------- | Keyboard Shortcut | ---------------------------- · Create: Breadcrumb Region Ctrl+/, C, B · ...