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.

Item     defined     as     :Pl-COUNTRY-CODE,      :Pl-AREA-CODE,

 

:Pl-TELE-LINE' Data's are 9l,4l42,28l700 needs to be stored in table as

 

+9l-4l42-28l700' Our process  is nothing but concatenating these three peace elements into a single data element'

COMPUTATION TYPE       →      STATIC ASSIGNMENT

 

+&Pl-COUNTRY-CODE' -&Pl-AREA-CODE'-&TELE-LINE' An ampersand symbol, page item name followed by period (') will return the value stored and it has been Joined with plus symbol and hyphen symbol to the required form'

COMPUTING TYPE →      PLlSQL FUNCTION BODY

 

declare

 

l-temp varchar2(200) default null;

 

begin

 

l-temp := '+' II :Pl-COUNTRY-CODE II '-' II :Pl-AREA-CODE II '-' II :Pl-TELE-LINE ;

RETURN l-temp;

 

end;

 

Bind variable colon (:) should be used while expression on concatenation

 

 

 

COMPUTATION TYPE       →      SQL QUERY

 

selec '+' II :Pl-COUNTRY-CODE II '-' II :Pl-AREA-CODE II '-'          II

 

:Pl-TELE-LINE from dual;

 

 

 

COMPUTATION TYPE       →      PLlSQL ExPRESSION