While sorting with date it should be converted using to_date first with the required format.
Other wise while sorting in Desc Order 31-02-2015 will come in front of 21-10-2015
SELECT * FROM tableName ORDER BY to_date(DATE_OF_BIRTH, 'DD-MM-YYYY');
While sorting with date it should be converted using to_date first with the required format.
Other wise while sorting in Desc Order 31-02-2015 will come in front of 21-10-2015
SELECT * FROM tableName ORDER BY to_date(DATE_OF_BIRTH, 'DD-MM-YYYY');
<a data-pagenum="2" onclick="paginate(this)" href="#">2</a>
var pageNum = $(pThis).data("pagenum"); //Outputs 2 in Console console.log(pageNum);
In Oracle if you want to limit the records based on ROWNUM(mostly while doing pagination) the between is not going to work.
Below Doesn’t work
SELECT Column1, Column2, ......., Column N FROM TableName WHERE ROWNUM Between 5 AND 10;
The alternate for this is as Follows
SELECT * FROM (SELECT rows_to_page.*, ROWNUM rnum FROM (SELECT Column1, Column2, ......., Column N FROM TableName WHERE ROWNUM Between 5 AND 10) rows_to_page WHERE ROWNUM < end_offset) WHERE rnum > start_offset;