Using Parameters in Order By Clause in PL - SQL

Tutorials Shared by the Internet Community

Advertisements


Using Parameters in Order By Clause in PL - SQL

Today I was working on a data table, output in HTML generated by PL/SQL

Statistics

  • Total Hits - 38036

  • Total Votes - 113 votes

  • Vote Up - 50 votes

  • Vote Down - 63 votes

  • Domain - joelennon.com

  • Category - Oracle/Oracle Misc

  • Submitted By - Shekhar

  • Submitted on - 2008-04-15 01:56:23

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.

Source Website

Please use the following link to visit the site. There is a possibility that this content has been removed from the given URL or may be this site has been shut down completely.

http://joelennon.com/?q=node/583

Broken  |   Save  |   Liked  |   Down

Advertisements