By Patch ~ June 27th, 2010. Filed under: Oracle, PL/SQL.
On my new job we wanted to provide some logging. Especially about what program is currently running. Of course it would be easy enough to add a line at the start of the program with the name of that program and one at the end. But, as things go during development, names (and types) of programs tend to change and we would have to change those lines accordingly. Something that can (and will) be easily forgotten.
Why not have the code tell us where we are. That way we wouldn’t have to change our code if the program name changes. But unfortunately there is no such thing as a function to tell me where I am.
Continue reading »
| No Comments »
By Patch ~ April 16th, 2010. Filed under: APEX, Oracle, SQL.
The other day someone at a customer had a question about displaying a report. The different options are in a table so he could easily use a report to display the options. But he wanted to display three columns of options. That is, if there are 10 options, he would want to display 3 rows of 3 options and a single row of 1 option.
| option 1 |
| option 2 |
| option 3 |
| option 4 |
| option 5 |
| option 6 |
| option 7 |
| option 8 |
| option 9 |
| option 10 |
should be displayed as:
| option 1 |
option 2 |
option 3 |
| option 4 |
option 5 |
option 6 |
| option 7 |
option 8 |
option 9 |
| option 10 |
|
|
How can this be done. The answer is in the query.
Continue reading »
| 4 Comments »
By Patch ~ March 28th, 2010. Filed under: APEX, CodeGen, Oracle.
When building code to support your APEX application, it is always nice to be able to generate large parts of that code. I am really fond of creating code using the QDA. The only trouble is that you need to create all the packages separately. What I have found works for me is to create a single script for the sequence, all the packages and the trigger creation. This is something that had to be done by hand because QNXO generates separate files for the different parts of the Table API. Continue reading »
| No Comments »
By Patch ~ February 8th, 2010. Filed under: APEX, Oracle, PL/SQL.
I have been playing around with Apex 4.0 on http://tryapexnow.com. When playing around with some ideas I have for application I decided to use the logging mechanism I created a while ago, to see what’s going on in the custom code.
Since this is a hosted environment it is not too easy to check the records in the log. There were a couple of queries needed to check the log. I usually run these from my IDE, but the is not possible now. They can be easily run using the SQL Workshop, but I have APEX at my disposal. So why not create a simple application to display the information in the log table. But if I create an application and start using it, it becomes publicly available and everybody can see what’s being logged (including the values of parameters). I need some sort of authentication here.
Continue reading »
| No Comments »
By Patch ~ December 27th, 2009. Filed under: Oracle, PL/SQL, SQL.
During the last couple of days I have been playing around with the new, hosted version of APEX. I know I haven’t been using all the features available in APEX and I have mostly been using my mod_plsql skills, because I don’t know how to do certain things in APEX (yet).
Continue reading »
| No Comments »