As we all know, starting version 11g Oracle tracks PL/SQL dependencies in much more granular way (more...)
As one of the examples I decided to illustrate how XMLType can be used as both a collection of (more...)
It leads to a standard problem - how do you make sure (more...)
There are a mixture of types too, fixed width, csv, etc. Thankfully, I've read enough of the code now that it's relatively easy to (more...)
One thing I've seen a lot of is calls to dbms_output.put_line. Fortunately, I've seen some dbms_application_info.set_module and other system calls too. But back to that first one.
1. When I used dbms_output, (more...)
Like a middle aged man visiting the gym for the first time in 10 years, I am merely going to flex my blogging muscles here…
One of the recurring issues that annoys me on the OTN SQL & PL/SQL forum, and also the APEX forum is the misunderstanding of what (more...)
One of the most interesting things in (more...)
The Transgressive Manifesto is quite short:
It's okay to useThe single underlying principle is that we value willful controversy over mindless conformity.
I do have a serious point here. Even programmers who haven't read the original article (because they can't spell Dijkstra and so can't find it through Google) know that
GOTOs are "considered harmful". But as Marshall and Webber point out, (more...)
Part of our testing mechanism is to verify that a bank account and sort-code combination is valid and we retrieve the bank details for that combination (using a commercial account lookup service). So we couldn't just replace the sort-code and/or account number with random numbers.
Conversely, replacing all account numbers with a handful of known, "safe" working values would lead to skewed data spreads, so that wouldn't work.
A better solution is to shuffle the existing data, moving the sort-code and account (more...)
SQL vs NoSQL: Third International NoCOUG SQL & NoSQL Challenge sponsored by Pythian
As published in the 102nd issue of the NoCOUG Journal
THE WICKED WITCH OF THE WEST NEEDS HELP
BE IT KNOWN BY THESE PRESENTS that the Wicked Witch of the West needs your help to create
The following SQL pattern can be used to simulate DML operations on XML data by utilizing XU (XQuery Update) functionalities.
This query will do the following XML data transformation by using XU insert/delete/rename/replace statements.
1) Convert all the XML Attributes to Elements. ( XU Delete & Insert) 2) Change the (more...)
The following XML Schema can be used to validate the XML input data in the XML DB.
It enforces the following validation rules:
1) Parent_Tab/Parent_Row/dep_id is the (primary) key within Parent_Tab.
2) Parent_Tab/Parent_Row/dep_name should be one of the xs:enumeration list in DeptnameType and it is also unique within Parent_Tab.
The following SQL pattern can be used to do XML based data manipulation and transformation by utilizing XSLT functionality.
This query will do the following data manipulation and transformation:
1) Rename the xml tag <FirstName> to <FN> when the position of the element node is
either the last one or (more...)
The ability to parse a CSV file in PL/SQL seems like a simple requirement and one would think that you could either a) easily implement it yourself, or b) find some examples of it on the web. Well if you have tried option A, you probably realized it gets real tricky when you have commas and double quotes in your actual data as well as having them as your deliminators and optionally enclosed by characters as well. Plus all that substr‘ing and instr‘ing can really hurt your head after a while. If you tried option B, then (more...)