Monday, November 18, 2013

How to insert a text every x rows in Notepad++?

Google search brought me to How to insert a line break every 5 rows in Excel/Word/Notepad++?

Using the suggested regex from the above source, replace the number 5 with x and replace \n with any text.

For example, to insert a commit; after every 100 lines in a sql script. This would be the regex -

Find       : ((.*\s*\n\s*){100})
Replace : $1commit;\n


Excel: Copy formula to tens of thousands of rows

Check the Quickly Copy Excel Formula Down to achieve it.

Note that it only works if there is data in the adjacent column only. So if the data is on column A and formula to be copied is on column C, then it will NOT work. The formula to be copied has to be on column B.



User names and tablespace names


Select all schema user names
select username from dba_users;


Select all tablespace names
select tablespace_name from dba_tablespaces;


Create a simple tablespace
CREATE TABLESPACE POOL_TS
  DATAFILE 'pool_ts.dat'
  SIZE 20M AUTOEXTEND ON;

Sunday, November 10, 2013

Your Message Wasn’t Delivered Because Of Security Policies

Java Mail API can be used to send emails. For a mail to be sent, at the minimum the following need to present -
  • Mail Server Host and Port [Mandatory]
  • Sender email id [Optional, can be a dummy mail id]
  • Receiver email id [Mandatory]
If the mail server is Microsoft Exchange, there could be a policy that requires sender authentication. It means that sender also needs to be a valid authenticated user. If a dummy mail id is used as sender, then MS Exchange would not let the mail be delivered.

In that event, the following articles explain how that can be disabled.

Note that the above settings need to be performed on the MS Exchange Mail Server. If MS Exchange Mail server cannot be accessed, then a valid sender needs to be used!

Dual label header cell split diagonally

Simple instructions to create Split cell diagonal. The article starts with angled text; scroll down a little bit.

Microsoft Excel - How to create a combination chart of Bar & Line and Secondary axis

Official Microsoft guide to Present your data in a combination chart

By default, there is only one vertical or horizontal axis called the Primary axes. One can Add or remove a secondary axis in a chart should you require it.

Friday, November 1, 2013

Oracle append string to select query


Append in a select statement can be achieved via the || operator.

select 'Mr.' || name from employee e where e.sex = 'M'

select case when e.sex = 'M' then 'Mr.' else 'Ms.' end || name as salutation_name from employee e

Friday, May 31, 2013

Oracle XE 11gR2 installation – “OracleXEService should not be installed already”

A simple guide on how to resolve Oracle XE 11gR2 installation failure. This error occurs when you are trying to install Oracle XE after successful un-install from Windows Control Panel.

Oracle XE 11gR2 installation – “OracleXEService should not be installed already”

Just make sure that Command Prompt is started using "Run as Administrator" 

Friday, May 24, 2013

Eclipse Xquery plugin and editor

XQuery Development Tools Installation  provides simple instructions to install XQDT and Zorba Xquery adapter.

In summary, you need to add the remote site http://download.eclipse.org/webtools/incubator/repository/xquery/milestones/ and install XQDT Core Features .

If your are using Eclipse 3.8 Juno or above, Cannot Install XQDT in Eclipse Error may occur.

Cannot complete the install because one or more required items could not be found.
  Software being installed: XQuery Development Tools Feature 0.8.0.201107251305 (org.eclipse.wst.xquery.feature.feature.group 0.8.0.201107251305)
  Missing requirement: XQDT Core Plug-in 0.8.0.201107251305 (org.eclipse.wst.xquery.core 0.8.0.201107251305) requires 'bundle org.eclipse.dltk.core [3.0.0,4.0.0)' but it could not be found
  Cannot satisfy dependency:
    From: XQuery Development Tools Feature 0.8.0.201107251305 (org.eclipse.wst.xquery.feature.feature.group 0.8.0.201107251305)
To: org.eclipse.wst.xquery.core [0.8.0.201107251305]

In order to overcome this issue, as suggested in the stackoverflow answer, install DLTK 3.0.0 from Eclipse Indigo update site - http://download.eclipse.org/releases/indigo.


You can also consider installing from DLTK Downloads directly any DLTK version that is greater than or equal to 3.0.0 but less than 4.0.0.