Browsing "Older Posts"

APEX-AT-WORK no image

Calculate minutes between two dates

Von Tobias Arnhold → 8.12.2014
Simple question but always a pain in the ass in finding the right solution:

select 
  round(
         (to_date('12.08.2014 12:30','dd.mm.yyyy hh24:mi')
           -to_date('12.08.2014 11:30','dd.mm.yyyy hh24:mi')
         ) * 24 * 60
       ,0) as result_in_minutes
from dual;
APEX-AT-WORK no image

Format Lower/Upper with SQL Developer

Von Tobias Arnhold → 7.20.2014
There is a simple trick to format your SQL code in LOWER,UPPER,INITCAP with SQL Developer.

Select the code you want to format and click the "Aa"-button or "Strg + Quote".

Default:


Target:



It is so simple but I never came on the idea to check this button.
APEX-AT-WORK no image

APEX Datei Download - Sicher und Einfach

Von Tobias Arnhold → 7.17.2014
Weil ich gerade selbst wieder im Internet nach der richtigen Lösung gesucht habe.
Hier der einfachste und bestbeschriebenste Weg wie Sie Dateien (über beispielsweise einen Report)  downloaden können:
http://joelkallman.blogspot.de/2014/03/yet-another-post-how-to-link-to.html


APEX-AT-WORK no image

APEX Security Tipps

Von Tobias Arnhold → 7.06.2014
Im aktuellen APEX Community Tipp, geht es um das Thema Sicherheit in APEX Anwendungen.

https://apex.oracle.com/pls/apex/GERMAN_COMMUNITIES.SHOW_TIPP?P_ID=2901

Imho:
Ein MUSS für jeden Entwickler!
APEX-AT-WORK no image

DOAG Development - 4 Juni 2014

Von Tobias Arnhold → 5.17.2014
Nachdem ich die APEX World Konferenz verpasst habe, ist es nun an der Zeit endlich wieder aktiv zu werden.

Unter dem Deckmantel DOAG Development gibt es an einem Tag APEX pur zu genießen. Es gibt so viele APEX Vorträge das diese gleichzeitig in mehreren Räumen präsentiert werden.  Heißt, wer mich nicht hören will, hat genug Alternativen zur Auswahl. :)

Jeder der aktuell APEX einsetzt sollte dies als positive Pflichtveranstaltung mitnehmen und genießen.

Details zur Veranstaltung
Wann:
04.06.2014

Ort:
Hotel Van der Valk Düsseldorf
Am Hülserhof 57
40472 Düsseldorf

Kosten:
Für DOAG Mitglieder  250 €
Für NICHT Mitglieder: 333 €
Imho: Für Oracle Verhältnisse ist das günstig.

Weiterführende Infos und das Vortragsprogramm findet Ihr unter:
http://development.doag.org/

Ps.: Am Abend davor gibt es ebenfalls eine sehr nette APEX Veranstaltung
http://www.doag.org/termine/termine.php?tid=473794

Eine Info die mich dazu über Twitter erreicht hat:

http://development.doag.org . Am Vorabend kann ein jeder seine Anwendung in 10 Min. vorstellen. Als Belohnung zahlen wir das Bier :)

 Wir sehen uns...
APEX-AT-WORK no image

Getting access to your Flash Anygantt via Javascript

Von Tobias Arnhold → 5.12.2014
In case you want to edit or react on actions inside your gantt during the runtime of your application. That's the way how to do it.

Get access to the gantt element with this Javascript command:
AnyGantt._charts.chart__0
A description about the possible activities can be found here:
http://www.anychart.com/products/anygantt/docs/users-guide/index.html?JavaScriptIntegration.html

Here is an example how to get the current startDate of the clicked period:
flash = AnyGantt._charts.chart__0;
flash.addEventListener('periodSelect',function(e){
document.getElementById("P1_CUR_START_DATE").value = flash.getSelectedPeriodInfo().startDate;
});  
Thanks to my colleague Richard in finding out how to do this.

APEX Validation: Check overlapping time periods

Von Tobias Arnhold → 1.20.2014
There is a easy way to check if a row with overlapping time periods exists inside your table.

We assume that our table is called T_MACHINE with the columns m_id (PK), valid_from and valid_until 

All you need to do is to create the following APEX validation:
Validation type: NOT Exist

SQL:
select 1 from T_MACHINE
WHERE (:P6_ID IS NOT NULL AND M_ID != :P6_ID OR :P6_ID IS NULL)
AND   (VALID_FROM <= TO_DATE(:P6_UNTIL,'DD.MM.YYYY')) and (TO_DATE(:P6_FROM,'DD.MM.YYYY') <= VALID_UNTIL)

First time I needed this solution it took me half a day for development and testing.
This time same problem but the solution was not available anymore.

What to do? I asked the WWW! Yes, first shot was a goal:
http://stackoverflow.com/questions/325933/determine-whether-two-date-ranges-overlap

Solution was ready in less then 30 minutes.