Posts

Showing posts from May, 2015

How to compare data in Excel?

Image
This example shows two ways to  compare text  in  Excel . One is case-sensitive and one is case-insensitive. 1. Use the EXACT function (case-sensitive). 2. Use the formula =A1=B1 (case-insensitive).

How to convert rows into comma separated values in SQL Oracle (4 ways to convert)

Image
I have this requirement many times while coding interfaces in oracle apps. Every time, I use different options.    Here, I tried to list out the four different ways of achieving the same. Let’s take the well-known SCOTT schema for our example. The requirement is to show the manager name along with sub-ordinate names in a comma separated list. So first, let us simply join the tables to see the records, OPTION 1: LISTAGG function ( Tested in Oracle 11g) SELECT     manager . ename manager ,           LISTAGG ( suboridinates . ename , ',' )   WITHIN   GROUP   (order   by suboridinates . ename )  suboridinates_list      FROM  emp suboridinates ,  emp manager     WHERE  manager . empno  =  suboridinates . mgr     GROUP   BY    manager . ename ORDER   BY  manager . ename ; OPTION 2: WM_CONCAT function (Tested in 11g version) Caution: This function is undocumented and unsupported by Oracle SELECT     manager . ename manager ,