I have produced this image with a variation of this script. Unfortunatly, I lost the script that created the picture above, but this script sort of comes close.
Friday, July 17, 2015
Wednesday, July 8, 2015
Whether you like it or not, no one should ever claim to be a data analyst until he or she has done string manipulation.
In the preface, I found the following quote, to which I wholeheartedly agree:
Saturday, June 20, 2015
data.entry(), it's easy to visually fill (small) matrices in r.
Let's see it in action. First, I create a 4x3 matrix:
The matrix is created with the cells' values being
NA Now, in order to assign values to these cells, I use
This opens a small window where I can enter the data.
This is how the cells were filled before my editing them:
And here's how they looked after my editing them just before I used File > Close:
Back in the shell, the matrix has indeed changed its values:
Pretty cool, imho.
Thursday, March 5, 2015
If the insert statement fails, is the sequence still incremented?
Let's try it with a test. The table:
After running this anonymous block, the table contains:
netxtvalis "wasted" if the insert statement fails.
Monday, February 16, 2015
With Perl and
CLOB in the table can be filled like so:
CLOB can be selected like so:
Tuesday, February 10, 2015
Here's a simple perl script that demonstrates its use:
NLS_LANGon Windows in SQL*Plus.
First, it can be verified if the environment variable
NLS_LANG is set:
SQL*Plus will answer with either something similar to
In the first case, the environment variable is set and its value, as displayed by the
echo command is the value for
If the variable is not set, that is in the second case, the following trick allows to determine its value none the less:
There are again two possibilities how SQL*Plus will react. Either
In the first case, the value for NLS_LANG is set in the Windows registry (to the value between [ and ]). In the second case, NLS_LANG is not even set in the Windows registry.
Incidentally, this seems to be achieved much easier like so
Saturday, February 7, 2015
In short, multiple PDFs can be joined so
Thursday, February 5, 2015
DBMS_DATAPUMPcan create SQL files from a schema so that these files can later be run to re-create the schema.
This is described in Oracle Note 1519981.1: How to Generate A SQL File Using The DBMS_DATAPUMP_API?. Unfortunately, the note does not explicitely state that the creation of such an sql file consists of two steps, first the schema has to be dumped ordinarly, then, the dumped file has to be turned into the desired SQL file.
Here are the steps to create such an SQL file.
First step: creating the dump file
Second step: turning the dump file into an SQL file
My question on dba.stackexchange.com
Wednesday, February 4, 2015
FROM_SCHEMA_A) that I need to clone on the same database. So, the cloned schema will go by another name, in my case by
In order to make things a bit more complicated,
FROM_SCHEMA_A references objects in another schema (named
SCHEMA_B). This other schema won't be cloned.
Schema definitionsBefore starting with the object definitions in the schemas, I create the needed schemas:
Here's the definition for the
SCHEMA_B schema. It consisists of one table only:
FROM_SCHEMA_A references this table, it needs some grants:
Here's the definition for the
Export/Import administratorIn order to perform the export and the import, I create a special export import administrator:
Performing the export and importWith that user, I am able to export the schema:
And the following import actually clones the schema. Of particular insterest is the call of
Monday, January 12, 2015
My understanding is that the
INTO clause should not be valid because the select statement is embeded in a
FOR r IN (SELECT...) loop. Yet, it compiles, at least in Oracle 11i.
Here's a little test script for demonstration purposes:
The output is
Tuesday, January 6, 2015
With this option enabled, vim will show how many lines a line is apart from the line with the cursor:
So, if I need to quickly jump to the select statement, I can type
9 because I see that it is 9 lines down, and
j because that moves the cursor down).