SQL & PL/SQL
Submitted by Sarvindu on Tue, 2009-10-20 05:55
Submitted by Kevin Meade on Fri, 2009-10-02 11:59
I saw one of those really interesting pieces of code recently. A guy wanted to run his transaction and make it fail when it was all done. Normally one would put ROLLBACK at the end of the transaction in order to undo a transaction's work. But this guy did not want to do that. He wanted to keep his transaction code unchanged, commit at the end and everything. He had several reasons for this, among them being that he did not have access to all the code he was working with and thus could not put the ROLLBACK where it was needed, and indeed suspected (as we eventually found to be true), that somewhere in the code stream there was a commit being done without his permission thus splitting his transaction in ways he did not intend. So he wanted a way to FOREORDAIN (determine ahead of time) that his transaction would fail no matter even if it went to conclusion without error. For this he came up with a I think a clever hack. Seems to me this might have some use, if I can figure out what that use might be. So here is the cool solution.
Submitted by Kevin Meade on Wed, 2009-09-30 12:38
Recently a friend asked me for this. I see it a lot on OraFaq as a question in the forums so here are the basics of working with delimited strings. I will show the various common methods for creating them and for unpacking them. Its not like I invented this stuff so I will also post some links for additional reading.
Submitted by akgc2 on Tue, 2009-09-15 04:28
You might face a situation where you need to interchange the values of two columns in an Oracle database table. This article will explore ways to achieve this.
Submitted by sreedevi_83 on Fri, 2009-07-31 00:38
Database tables are structured in columns and rows. However, some data lends itself to switching row data as column data for expository purposes. The pivot operation in SQL allows the developer to arrange row data as column fields. For example, if there are two customers who have both visited a store exactly four times, and you want to compare the amount of money spent by each customer on each visit, you can implement the pivot operation.
Submitted by rnanton on Tue, 2009-03-10 19:10
Here’s an alternative to the union statement for creating a collection of values using the Oracle SQL Model construct in 10g.
Submitted by divishal on Wed, 2008-12-10 17:14
Over a period of time, I have seen many database (backend) centric projects using huge amount of processing, I found most of them lacking Development Framework, To make it more clear I would say that Framework is not only limited to GUI like JAVA DOT.NET. It is certain sets of standards used before starting development projects, This presentation will support approach towards achieving this objective.
Submitted by Kevin Meade on Tue, 2008-09-02 19:58
Recently I have noticed there has been considerable talk on the WEB about date logic; in particular talk about overlapping date ranges and how to detect them. I can't say why there is such an interest, but some people have turned to an undocumented feature (a function called OVERLAPS) to solve their problems. This article will describe date overlap, and show equivelant SQL that will allow you to avoid using this undocumented feature which as always is a good idea, because undocumented features in Oracle have propensity to change and/or disappear unexpectedly leaving those who foolishly realied upon them in unanticipated trouble after an upgrade.
Submitted by harrysmall3 on Tue, 2008-08-26 07:50
This Blog is to be serve as a compilation of my research in preparation for a paper on
The extreme performance issues with PL/SQL String Functions and how to circumvent their usage using Straight SQL. The Object Oriented approach allows SQL to be virtually executed against "Anything" not just tables - data fields, variables, even a single character!
Submitted by dwarak.k on Thu, 2008-06-26 01:48
A relational database does not store data in a hierarchical way. Then how do I get the data in a hierarchical manner? Here we get to know about how to use the hierarchical querying feature which Oracle has given. This article talks about how you can interpret the hierarchical query conceptually and build hierarchical queries catering your needs.
Using hierarchical queries, you can retrieve records from a table by their natural relationship. Be it a family tree or a employee/manager tree or what ever.