Showing posts from 2019

Use record type as an OUT parameter in Oracle PL/SQL Stored Procedure

Objective :  How to print record type values in Oracle PL/SQL . Solution : Step 1:  Create package  fxgn_sample_pkg . DROP PACKAGE  fxgn_sample_pkg ; create or replace   PACKAGE  fxgn_sample_pkg     as         TYPE fxgn_sample_rectype IS RECORD ( p_name varchar2(40),                                                                                               p_emp_id number                                                                                     );         type fxgn_sample_table_rectype  is table of fxgn_sample_rectype;         procedure fxgn_sample_prc ( fxgn_sample_table_rec1 OUT fxgn_sample_table_rectype                                                                             ); END  fxgn_sample_pkg ; / create or replace   PACKAGE BODY  fxgn_sample_pkg     AS       PROCEDURE  fxgn_sample_prc ( fxgn_sample_table_rec1 OUT fxgn_sample_table_rectype )         IS            BEGIN                SELECT  ename,                                

Select list pagination in Oracle APEX 18.2 Interactive Grid (IG)

Objective: To bring select list pagination in Interactive Grid. Solution: Step 1:   Create Interactive Grid. Step 2:   Set   show total row count =  YES. Step 3:  Add the below JS in the JS section of the IG attributes. function(config) {     config.defaultGridViewOptions = {         rowHeader: "sequence",         pagination: {                                                         showRange: true,             showPageSelector: true,             showPageLinks: false, // uncomment to hide the first and last buttons //            firstAndLastButtons: false         }     };     config.defaultIconViewOptions = {         collectionClasses: "t-Cards t-Cards--compact t-Cards--displayIcons u-colors t-Cards--desc-2ln"     };     return config; // don't forget to return this! } Output: Related Posts: Load more row option in OracleAPEX 18.2 Interactive Grid (IG)

UTL_SMTP: Send an Email to Multiple Recipients with Attachments from Oracle PL/SQL

Here i am giving an example to send an email to multiple recipients with attachments from Oracle PL/SQL. I took this as challenge and done this for my client. Note: Blob (file) Stored in Oracle Directory. Explanation: The UTL_SMTP package was introduced in Oracle 8i and can be used to send emails from PL/SQL. Email with Attachments: Attaching a BLOB requires the binary data to be encoded and converted to text so it can be sent using  UTL_SMTP . Multiple Recipients: When dealing with multiple recipients, the UTL_SMTP.RCPT procedure needs to be called for each recipient, whether they are a "TO", "CC" or "BCC". The distinction between the types of recipient is made in the descriptions in the WRITE_DATA calls. The following procedure accepts comma separated "TO", "CC" and "BCC" parameters. The "TO" is mandatory, but the others are optional. If present, they are processed appropriately by splitting th