I am frequently asked how to create a custom SQL folder that will generate a known list of values. The following two examples of SQL are identical in their output and you are free to choose the one that you prefer. In terms of performance, the first is more efficient but is a little more difficult to understand.
Both pieces of code produce a folder with two items: an item called PRODLINE and an item called SEQUENCE. You can use the SEQUENCE when creating an alternate sort. Have fun!
CONNECT BY LEVEL <= 4
SELECT 'MINI-WIDGET' PRODLINE, 1 SEQUENCE FROM DUAL
SELECT 'SUPER-WIDGET' PRODLINE, 2 SEQUENCE FROM DUAL
SELECT 'MEGA-WIDGET' PRODLINE, 3 SEQUENCE FROM DUAL
SELECT 'WONDER-WIDGET' PRODLINE, 4 SEQUENCE FROM DUAL
Infosys, NRN Murthy, and Vishal Sikka - No One's Smelling of Roses - C orporate sagas seem to come in twos. The mega-fracas that erupted in 2016 between *Cyrus Mistry*, then Chairman of Tata Sons, and the iconic *Ratan Tat...
2 months ago