Posts tagged ‘SQL’

Combine multiple Rows to a Column – Oracle

Oracle SQL to convert multiple rows of result set to a single column. CREATE TABLE FRUITS ( NAME VARCHAR2(20)); INSERT INTO FRUITS VALUES ('APPLE'); INSERT INTO FRUITS VALUES ('BANANA'); INSERT INTO FRUITS VALUES ('CHERRY'); SELECT SUBSTR (SYS_CONNECT_BY_PATH (NAME , ','), 2) FRUITS_LIST FROM (SELECT NAME , ROW_NUMBER () OVER (ORDER BY NAME ) RN, COUNT [...]...Read full story

Return to top

Date Dimension SQL Scripts – Oracle

SQL Scripts to create Date Dimension in Oracle....Read full story

Return to top

Date Dimension SQL Scripts – MS SQL Server

MS SQL Server scripts to create Date Dimension....Read full story

Return to top

Date Dimension SQL Scripts – MySQL

Simple MySQL Scripts to create Date Dimension....Read full story

Return to top

Pivoting a Result Set into One Row – Columns to row

Pivoting a Result Set into One Row - Columns to row...Read full story

Return to top

SQL – Select second highest value for a column in a Table

SQL to Select second highest value for a column in a table....Read full story

Return to top