Shared Tutorials

Tutorials Shared by the Internet Community

Advertisements

  Top Tutorials     New Tutorials     Submit     Login     Register  

Tutorial Basic Detail

Using Parameters in Order By Clause in PL - SQL

Today I was working on a data table, output in HTML generated by PL/SQL
http://joelennon.com/?q=node/583
  • Total Hits: 21983

  • Average Rating :
    Tutorial RatingTutorial RatingTutorial RatingTutorial RatingTutorial RatingTutorial Rating

  •  

  • Total Votes: 145 votes

  • Average Rating: 2.83 out of  5

  • Category: Oracle/Misc

  • Set as Favorite

Description:

Basically I have a procedure which takes a parameter (p_sort_by) and establishes which column to sort by based on this parameter. It does this using the DECODE function, which has similar functionality to IF-THEN-ELSE statements. I could have alternatively used CASE statements here, which are easier to understand, but they are not supported in older versions of Oracle.

Rating Detail

 Stars  Percentage  Total Vote
 One star  Vote LeftVote MiddleVote Right 37.93%  55
 Two starsTwo star  Vote LeftVote MiddleVote Right 10.34%  15
 Three starsThree starsThree stars  Vote LeftVote MiddleVote Right 11.72%  17
 Four starsFour starsFour starsFour stars  Vote LeftVote MiddleVote Right 11.03%  16
 Five starsFive starsFive starsFive starsFive stars  Vote LeftVote MiddleVote Right 28.97%  42

Caste Your Vote

 Rating  Selection  Guidelines
 Poor:     Very disappointing, useless.
 Fair:     Below average, disappointing but not useless.
 Good:     About average in its class.
 Very Good:     Above average for its category.
 Excellent:     One of the best Tutorials in its category.





Advertisements