A question popped up, which I thought was interesting. How can you create a
DB_LINK in Oracle without the DBA changing the
tnsnames.ora file? It’s actually quite easy, especially if the DBA sets the TNS address name the same as the instance’s service name or in older databases SID value.
- Do the following with the
It should return this when the server’s
mohawkand domain name is
Did you read the title of this blog post! Read it again.
Yes, Yes, I know what you are saying, "SQL cannot produce graphics or charts and particularly not ggplot2 graphics".
You are correct to a certain extent. SQL is rubbish a creating graphics (and I'm being polite).
But with Oracle R Enterprise you can now produce graphics on your data using the embedded R execution feature of Oracle R Enterprise using SQL. In this (more...)
What three things do you think every developer must know about #SQL ?— Chris Saxon (@chrisrsaxon) July 5, 2016
Reply and share yours!
My immediate thought regarded features I'd be disappointed to live without. Looking at some other responses I realise that the answer matches Tom Kyte's creed: "it depends".
Here is a collection of responses that I think sums(sql) really well, (more...)
Use of ANSI SQL is a personal thing.
Historically I have not been a fan apart from where it makes things easier/possible.
This reticence was mainly due to optimizer bugs and limitations in the earlier days.
Recently I have been using it much more because I find that the developers I interact with prefer it / understand it better.
You might/should be aware that Oracle will rewrite ANSI SQL to an Oracle syntax representation, this (more...)
Weekend #SQL poll: when mapping binds/columns that could contain nulls to non-nulls do you use:— SQL Daily (@sqldaily) July 1, 2016
Why? Because I think coalesce is a good idea and the modern equivalent of NVL.
I follow @SQLDaily for useful tips. Oracle SQL evangelist Chris Saxon runs the feed.
When I wrote the previous post, about updatable views, I noticed an interesting issue.
The documentation says:
If a view is defined by a query that contains SET or DISTINCT operators, a GROUP BY clause, or a group function, then rows cannot be inserted into, updated in, or deleted from the base tables using the view.
Let’s create a view with a GROUP BY clause and a group function:
ORA$BASE> create table t (more...)
In a previous post I wrote about one misconception about views that is revealed when I talk about Editioning Views in my EBR (Edition-Based Redefinition) presentations.
This post is about another misconception.
In the part of the presentation in which I “preach” to cover every table with an Editioning View and to replace every reference to tables in the code with reference to the corresponding Editioning Views, I usually get the following question from the (more...)
Suppose you have data in your PL/SQL program stored in a collection. I am using the EMP table (14 records) but you should imagine you have many, many more records in your collection. If you want to order (sort) your collection in a different manner somewhere in your code you can of course write your own sorting routine but the Oracle database is doing this for ages and probably a lot smarter (after all these (more...)
I just found this link on OTN to vote for including assertions in a future release of the Oracle database.
A great idea – please vote for it.
One of the most important votes this month…well, I do live in England!
When solving Kakuro it is essential to know for a given integer X and a given number of elements N all the combinations of N non-repeating digits [1-9] that their sum equals to X.
For example, there is only one combination for creating the number 7 from 3 elements:
And there are 6 combinations for creating the number 15 from 4 elements:
1+2+3+9 1+2+4+8 1+2+5+7 1+3+4+7 1+3+5+6 2+3+4+6
Let’s generate a list of all (more...)