Oracle SQL, PLSQL, APEX How To's by Dr. S. Raghunathan - HTML preview

PLEASE NOTE: This is an HTML preview only and some elements such as links or page numbers may be incorrect.
Download the book in PDF, ePub, Kindle for a complete version.

 

 

REPORT-TYPE         COUNT(*)

 

- - - - - - - - - - -           - - - - - - - BS                            2

PL                           1

 

 

We shall try to analyze, using the report-type column, as how many records are duplicated , Behind logic,

count(*) producing more than 1 indicates that the records are duplicated,

14.08  How to use having clause

 

Syntax: select report-type, count(*) as records from raak-ledger-master group by report-type having count(*) > 1 ;

Result:           REPORT-TYPE         COUNT(*)

 

- - - - - - - - - - -           - - - - - - - BS                            2

 

14.09      How to use order by clause

 

On introduction of GROUP BY, HAVING command we shall be able to evaluate the records in different manner and meet different requirements, The resultant values