All posts by m.ogun
Work with WITH option in Oracle 12c!
oracle 12c: using functions with WITH
Starting Oracle 9.0 – according to SQL 1999 standard – Oracle introduced the WITH option which can be considered
as the extension of the inline views.
Let’s see an “old” example:
(The origin of this statement is Oracle course,titled:
Oracle Database: SQL Fundamentals I
Volume II • Student Guide).
In Oracle 12c we have new enhancements for this kind of SQL statement:
We can define “in-line” functions or procedures after the WITH clause.
In the following example we are looking for those departments, where
total salary of the department is greater than the maximum of the average of the total salaries:
The result is:
The execution plan is the following ( not very simple!):
We can use the WITH option with plsql_declarations clause
in DML statements as well.
Let’s consider the following example where we want to compute the
tax amount of the salaries and modify the tax_amount column,
but…
View original post 124 more words
Analytic Views: Powerful Oracle 12.2 Feature for Business Intelligence
Oracle 12.2: Analytic Views
Analytic Views are one of the main features for Business Intelligence introduced with Oracle 12c Release 2. They provide a lot of new possibilities for analytical queries on star schemas. This blog post gives an overview of the new functionality.
View original post 2,453 more words
ANSI Join Syntax and Query Rewrite
which JOIN syntax?
There are many good reasons to use ANSI join syntax instead of the old Oracle join syntax. With one exception: If you want to use your Materialized Views for Query Rewrite, avoid to write them with ANSI joins.
View original post 1,471 more words
10 Oracle plsql things you probably didn’t know
Iconic!
Many people enjoyed reading my last blog post “10 Oracle SQL features you probably didn’t know”. So I decided to spice it up a little more and do something similar for plsql.
I hope you like that one too.
With our further ado, let’s get started with the list.
10. The first Oracle version to feature plsql was Oracle DB version 6 (1988)
And no. Steven Feuerstein did NOT invent it.
At that time PLSQL did not have stored procedures nor did it have proper exception handling. But it already had embedded SQL.
I learned that from the great Lewis Cunningham. One of the godfathers of development with SQL and PLSQL.
Stored Procedures were added in Oracle 7 (1992). 7.3 was the version when I started to work with an Oracle Database. At that point plsql was in version 2.x. However there never was a version 3. Plsql versioning…
View original post 2,297 more words
What is a Group?
Good morning RTU followers. Today I want give you a very brief introduction to an integral part of Theoretical Physics – Group Theory. When studying for my MSc I knew I had to get my head around this subject which to me initially seemed very dry and written in very purely mathematical language (i.e. not easy to read!) However once I’d dedicated some time the beauty of group theory began to fall into place – it’s a slow burner. The purpose of group theory is to classify and understand symmetries in the natural world. So without further ado let me lay down the principles of group theory as clearly as I can.
Firstly a group, denoted G, is a collection of elements call them g(1), g(2), g(3)…. and there exists a group operation, denote it *, which determines how the elements act on each other. Now the elements of the…
View original post 928 more words
ALT YÜZ BÖLGESİNDEN MORFOLOJİK YÖNTEMLERLE YAŞ TAYİNİ (Yüksek Lisans Tezi)
İNSANLAR ARASINDAKİ BİYOLOJİK FARKLILIKLARIN SOSYAL ÇIKARLAR İÇİN KULLANILMASI
APEX: Form on a Procedure
Hi!
You have a procedure.
And you want to prepare an interface for enduser so they could execute it by themselves.
however, your procedure is expecting some input parameters which are not so-easy for the users to get..
Let ‘s go with an example:

example
Say this procedure is taking an account number and generating a risk report for that customer.
So you decided to publish a form on one of your APEX user dashboards:

After a few easy steps with this wizard, you ‘ll have your form with a field (i.e. :p_acc)on it prompting you to enter an account number
Although it works just fine, it is not that easy for users to know which company has which number. It would be way easier if they could go with company name for instance..
If you have no chance to touch to that procedure, means you can ‘t modify it to make it work with another parameter instead of v_acc (account number), you still can do something similar.
i. Create a Page Item on your page region
ii. Display as: Text with autocomplete
iii. Give your new page item a unique name (i.e. :p_cust_name)
iv. Adjust the population logic of your text field to make auto-complete thing work.
v. Then take a look at execution statement which runs your SP. You can see it by double-clicking Run Stored Procedure

vi. You ‘ll see something like this
#OWNER#.basitmis_proc(V_ACC => :p_acc);
vii. Now let ‘s modify it so it could work with our other parameter :p_cust_name

Let ‘s see what we did here:
i.We declared another variable p_cust
ii.Use it to collect account number. To know which customer ‘s account should return, we used our Page Item p_cust_name and remember, this information was provided by user.
iii.Then we bind it to our SP
**
Now your users can type ABC to automatically get ABC Company in the company name field, then click the button that triggers your execution process. Your little declaration above will do the rest :)
Tschau!