Search This Blog

Wednesday, May 29, 2019

Install Oracle Apex 19.1 on Oracle 11g

SELECT NAME FROM V$DATAFILE ; KEEP THE PATH FROM OTHER TABLESPACE. Step-1 CREATE TABLESPACE APEX DATAFILE 'D:\APP\JEWEL\ORADATA\ORCL\MFIMIS\APEX.DBF' SIZE 10M AUTOEXTEND ON NEXT 20M; Step-2 @APEXINS.SQL APEX1 APEX1 TEMP /i/ Step-3 @APXCHPWD.SQL Step-4 @APXLDIMG E:\apex_19.1 Step-5 @apex_epg_config.sql E:\apex_19.1 Step-6 EXEC DBMS_XDB.SETHTTPPORT(8888) ; Step-7 ALTER USER ANONYMOUS ACCOUNT UNLOCK ; ALTER USER APEX_PUBLIC_USER ACCOUNT UNLOCK; ALTER USER APEX_PUBLIC_USER IDENTIFIED BY vinish;<title> SELECT NAME FROM V$DATAFILE ;<br /> <br /> KEEP THE PATH FROM OTHER TABLESPACE.<br /> <b><br /></b> <b>Step-1</b><br /> CREATE TABLESPACE APEX DATAFILE 'D:\APP\JEWEL\ORADATA\ORCL\MFIMIS\APEX.DBF' SIZE 10M  AUTOEXTEND ON NEXT 20M;<br /> <br /> <b>Step-2</b><br /> @APEXINS.SQL APEX1 APEX1 TEMP /i/<br /> <br /> <b>Step-3</b><br /> @APXCHPWD.SQL<br /> <br /> <b>Step-4</b><br /> @APXLDIMG E:\apex_19.1<br /> <br /> <b>Step-5</b><br /> @apex_epg_config.sql E:\apex_19.1<br /> <br /> <b>Step-6</b><br /> EXEC DBMS_XDB.SETHTTPPORT(8888) ;  <br /> <br /> <b>Step-7</b><br /> ALTER USER ANONYMOUS ACCOUNT UNLOCK ;<br /> <br /> ALTER USER APEX_PUBLIC_USER ACCOUNT UNLOCK;<br /> <br /> ALTER USER APEX_PUBLIC_USER IDENTIFIED BY vinish; SELECT NAME FROM V$DATAFILE ;

 KEEP THE PATH FROM OTHER TABLESPACE.

 Step-1 CREATE TABLESPACE APEX DATAFILE 'D:\APP\JEWEL\ORADATA\ORCL\MFIMIS\APEX.DBF' SIZE 10M AUTOEXTEND ON NEXT 20M;

 Step-2 @APEXINS.SQL APEX1 APEX1 TEMP /i/

 Step-3 @APXCHPWD.SQL

 Step-4 @APXLDIMG E:\apex_19.1 (This path is apex folder's immediate previous directory )

 Step-5 @apex_epg_config.sql E:\apex_19.1 (This path is apex folder's immediate previous directory )

 Step-6 EXEC DBMS_XDB.SETHTTPPORT(8888) ;

 Step-7  ALTER USER ANONYMOUS ACCOUNT UNLOCK ;
 ALTER USER APEX_PUBLIC_USER ACCOUNT UNLOCK;
 ALTER USER APEX_PUBLIC_USER IDENTIFIED BY vinish; SELECT NAME FROM V$DATAFILE ;<br /> <br /> KEEP THE PATH FROM OTHER TABLESPACE.<br /> <b><br /></b> <b>Step-1</b><br /> CREATE TABLESPACE APEX DATAFILE 'D:\APP\JEWEL\ORADATA\ORCL\MFIMIS\APEX.DBF' SIZE 10M  AUTOEXTEND ON NEXT 20M;<br /> <br /> <b>Step-2</b><br /> @APEXINS.SQL APEX1 APEX1 TEMP /i/<br /> <br /> <b>Step-3</b><br /> @APXCHPWD.SQL<br /> <br /> <b>Step-4</b><br /> @APXLDIMG E:\apex_19.1<br /> <br /> <b>Step-5</b><br /> @apex_epg_config.sql E:\apex_19.1<br /> <br /> <b>Step-6</b><br /> EXEC DBMS_XDB.SETHTTPPORT(8888) ;  <br /> <br /> <b>Step-7</b><br /> ALTER USER ANONYMOUS ACCOUNT UNLOCK ;<br /> <br /> ALTER USER APEX_PUBLIC_USER ACCOUNT UNLOCK;<br /> <br /> ALTER USER APEX_PUBLIC_USER IDENTIFIED BY vinish;

Monday, May 27, 2019

Calling JS by ID

$("td[headers=myimgid]").click(function(){     // myimgid is a ID

 (I use it for Image Size)

    ShowLargeImage(this);
});
<title>
<span style="font-family: "courier new" , "courier" , monospace;">$("td[headers=myimgid]").click(function(){    </span> // myimgid is a ID<br />
 (I use it for Image Size)<br />
<span style="font-family: "courier new" , "courier" , monospace;">    ShowLargeImage(this);</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">  </span><br />
<span style="font-family: "courier new" , "courier" , monospace;">});</span>
$("td[headers=myimgid]").click(function(){ // myimgid is a ID (I use it for Image Size) ShowLargeImage(this); }); <title> <span style="font-family: "courier new" , "courier" , monospace;">$("td[headers=myimgid]").click(function(){    </span> // myimgid is a ID<br />  (I use it for Image Size)<br /> <span style="font-family: "courier new" , "courier" , monospace;">    ShowLargeImage(this);</span><br /> <span style="font-family: "courier new" , "courier" , monospace;">  </span><br /> <span style="font-family: "courier new" , "courier" , monospace;">});</span>

Sunday, May 26, 2019

Multi Table Update In One Update Query

UPDATE (SELECT B.CHECK_V AS OLD, B.CHECK_V AS NEW

          FROM MAS A INNER JOIN DTL B ON A.ID = B.SECTION_ID

         WHERE A.DOCNUMBR = :P6_DOC AND B.ROWID = :ROWID_X) T

   SET T.NEW = :CHECK_V;
<title>
<span style="font-family: "courier new" , "courier" , monospace;">UPDATE (SELECT B.CHECK_V AS OLD, B.CHECK_V AS NEW</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">          FROM MAS A INNER JOIN DTL B ON A.ID = B.SECTION_ID</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">         WHERE A.DOCNUMBR = :P6_DOC AND B.ROWID = :ROWID_X) T</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">   SET T.NEW = :CHECK_V;</span>
UPDATE (SELECT B.CHECK_V AS OLD, B.CHECK_V AS NEW FROM MAS A INNER JOIN DTL B ON A.ID = B.SECTION_ID WHERE A.DOCNUMBR = :P6_DOC AND B.ROWID = :ROWID_X) T SET T.NEW = :CHECK_V; <title> <span style="font-family: "courier new" , "courier" , monospace;">UPDATE (SELECT B.CHECK_V AS OLD, B.CHECK_V AS NEW</span><br /> <span style="font-family: "courier new" , "courier" , monospace;">          FROM MAS A INNER JOIN DTL B ON A.ID = B.SECTION_ID</span><br /> <span style="font-family: "courier new" , "courier" , monospace;">         WHERE A.DOCNUMBR = :P6_DOC AND B.ROWID = :ROWID_X) T</span><br /> <span style="font-family: "courier new" , "courier" , monospace;">   SET T.NEW = :CHECK_V;</span>

Example Code Of MERGE Insert/ Update

MERGE INTO MAS M USING (SELECT * FROM TEMPL) T ON (M.SECTION_ID = T.SECTION_ID AND M.DOCNUMBR = :P6_DOC) WHEN MATCHED THEN UPDATE SET M.M_NAME = T.M_NAME, M.MODIFYDT = SYSDATE WHEN NOT MATCHED THEN INSERT (SECTION_ID, COM, DOCNUMBR) VALUES (T.SECTION_ID, T.COM, :P6_DOC); COMMIT; <title> <span style="font-family: "courier new" , "courier" , monospace;">MERGE INTO MAS M</span><br /> <span style="font-family: "courier new" , "courier" , monospace;">     USING (SELECT * FROM TEMPL) T</span><br /> <span style="font-family: "courier new" , "courier" , monospace;">        ON (M.SECTION_ID = T.SECTION_ID AND M.DOCNUMBR = :P6_DOC)</span><br /> <span style="font-family: "courier new" , "courier" , monospace;">WHEN MATCHED</span><br /> <span style="font-family: "courier new" , "courier" , monospace;">THEN</span><br /> <span style="font-family: "courier new" , "courier" , monospace;">   UPDATE SET M.M_NAME = T.M_NAME, M.MODIFYDT = SYSDATE</span><br /> <span style="font-family: "courier new" , "courier" , monospace;">WHEN NOT MATCHED</span><br /> <span style="font-family: "courier new" , "courier" , monospace;">THEN</span><br /> <span style="font-family: "courier new" , "courier" , monospace;">   INSERT     (SECTION_ID, COM, DOCNUMBR)</span><br /> <span style="font-family: "courier new" , "courier" , monospace;">       VALUES (T.SECTION_ID, T.COM, :P6_DOC);</span><br /> <span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span> <span style="font-family: "courier new" , "courier" , monospace;">COMMIT;</span></span> <div style='clear: both;'></div> </div> <div class='post-footer'> <div class='post-footer-line post-footer-line-1'> <span class='post-author vcard'> </span> <span class='post-timestamp'> at <meta content='http://qaiumer.blogspot.com/2019/05/example-code-of-merge-insert-update.html' itemprop='url'/> <a class='timestamp-link' href='http://qaiumer.blogspot.com/2019/05/example-code-of-merge-insert-update.html' rel='bookmark' title='permanent link'><abbr class='published' itemprop='datePublished' title='2019-05-26T23:35:00-07:00'>May 26, 2019</abbr></a> </span> <span class='post-comment-link'> <a class='comment-link' href='http://qaiumer.blogspot.com/2019/05/example-code-of-merge-insert-update.html#comment-form' onclick=''> No comments: </a> </span> <span class='post-icons'> <span class='item-action'> <a href='https://www.blogger.com/email-post.g?blogID=221167718733428956&postID=8182565940595423446' title='Email Post'> <img alt='' class='icon-action' height='13' src='https://resources.blogblog.com/img/icon18_email.gif' width='18'/> </a> </span> <span class='item-control blog-admin pid-1873727678'> <a href='https://www.blogger.com/post-edit.g?blogID=221167718733428956&postID=8182565940595423446&from=pencil' title='Edit Post'> <img alt='' class='icon-action' height='18' src='https://resources.blogblog.com/img/icon18_edit_allbkg.gif' width='18'/> </a> </span> </span> <div class='post-share-buttons goog-inline-block'> <a class='goog-inline-block share-button sb-email' href='https://www.blogger.com/share-post.g?blogID=221167718733428956&postID=8182565940595423446&target=email' target='_blank' title='Email This'><span class='share-button-link-text'>Email This</span></a><a class='goog-inline-block share-button sb-blog' href='https://www.blogger.com/share-post.g?blogID=221167718733428956&postID=8182565940595423446&target=blog' onclick='window.open(this.href, "_blank", "height=270,width=475"); return false;' target='_blank' title='BlogThis!'><span class='share-button-link-text'>BlogThis!</span></a><a class='goog-inline-block share-button sb-twitter' href='https://www.blogger.com/share-post.g?blogID=221167718733428956&postID=8182565940595423446&target=twitter' target='_blank' title='Share to Twitter'><span class='share-button-link-text'>Share to Twitter</span></a><a class='goog-inline-block share-button sb-facebook' href='https://www.blogger.com/share-post.g?blogID=221167718733428956&postID=8182565940595423446&target=facebook' onclick='window.open(this.href, "_blank", "height=430,width=640"); return false;' target='_blank' title='Share to Facebook'><span class='share-button-link-text'>Share to Facebook</span></a><a class='goog-inline-block share-button sb-pinterest' href='https://www.blogger.com/share-post.g?blogID=221167718733428956&postID=8182565940595423446&target=pinterest' target='_blank' title='Share to Pinterest'><span class='share-button-link-text'>Share to Pinterest</span></a> </div> </div> <div class='post-footer-line post-footer-line-2'> <span class='post-labels'> </span> </div> <div class='post-footer-line post-footer-line-3'> <span class='post-location'> </span> </div> </div> </div> </div> </div></div> <div class="date-outer"> <h2 class='date-header'><span>Thursday, May 23, 2019</span></h2> <div class="date-posts"> <div class='post-outer'> <div class='post hentry uncustomized-post-template' itemprop='blogPost' itemscope='itemscope' itemtype='http://schema.org/BlogPosting'> <meta content='221167718733428956' itemprop='blogId'/> <meta content='6523709598230927409' itemprop='postId'/> <a name='6523709598230927409'></a> <h3 class='post-title entry-title' itemprop='name'> <a href='http://qaiumer.blogspot.com/2019/05/error-message-in-oracle-apex.html'>Error Message In Oracle Apex</a> </h3> <div class='post-header'> <div class='post-header-line-1'></div> </div> <div class='post-body entry-content' id='post-body-6523709598230927409' itemprop='description articleBody'> Red Error :<br /> <br /> <span style="font-family: Arial, Helvetica, sans-serif;"><h7 style="color:#de0a0a;">#SQLERRM_TEXT#</h7></span><br /> <br /> Error Message Like Raise_application_error.<br /> <br /> <span style="font-family: Courier New, Courier, monospace;">apex_error.add_error(</span><br /> <span style="font-family: Courier New, Courier, monospace;">p_message=> 'Error Message!!!' ,</span><br /> <span style="font-family: Courier New, Courier, monospace;">p_display_location=> apex_error.c_inline_in_notification   </span><br /> <span style="font-family: Courier New, Courier, monospace;">) ;</span> <div style='clear: both;'></div> </div> <div class='post-footer'> <div class='post-footer-line post-footer-line-1'> <span class='post-author vcard'> </span> <span class='post-timestamp'> at <meta content='http://qaiumer.blogspot.com/2019/05/error-message-in-oracle-apex.html' itemprop='url'/> <a class='timestamp-link' href='http://qaiumer.blogspot.com/2019/05/error-message-in-oracle-apex.html' rel='bookmark' title='permanent link'><abbr class='published' itemprop='datePublished' title='2019-05-23T02:44:00-07:00'>May 23, 2019</abbr></a> </span> <span class='post-comment-link'> <a class='comment-link' href='http://qaiumer.blogspot.com/2019/05/error-message-in-oracle-apex.html#comment-form' onclick=''> No comments: </a> </span> <span class='post-icons'> <span class='item-action'> <a href='https://www.blogger.com/email-post.g?blogID=221167718733428956&postID=6523709598230927409' title='Email Post'> <img alt='' class='icon-action' height='13' src='https://resources.blogblog.com/img/icon18_email.gif' width='18'/> </a> </span> <span class='item-control blog-admin pid-1873727678'> <a href='https://www.blogger.com/post-edit.g?blogID=221167718733428956&postID=6523709598230927409&from=pencil' title='Edit Post'> <img alt='' class='icon-action' height='18' src='https://resources.blogblog.com/img/icon18_edit_allbkg.gif' width='18'/> </a> </span> </span> <div class='post-share-buttons goog-inline-block'> <a class='goog-inline-block share-button sb-email' href='https://www.blogger.com/share-post.g?blogID=221167718733428956&postID=6523709598230927409&target=email' target='_blank' title='Email This'><span class='share-button-link-text'>Email This</span></a><a class='goog-inline-block share-button sb-blog' href='https://www.blogger.com/share-post.g?blogID=221167718733428956&postID=6523709598230927409&target=blog' onclick='window.open(this.href, "_blank", "height=270,width=475"); return false;' target='_blank' title='BlogThis!'><span class='share-button-link-text'>BlogThis!</span></a><a class='goog-inline-block share-button sb-twitter' href='https://www.blogger.com/share-post.g?blogID=221167718733428956&postID=6523709598230927409&target=twitter' target='_blank' title='Share to Twitter'><span class='share-button-link-text'>Share to Twitter</span></a><a class='goog-inline-block share-button sb-facebook' href='https://www.blogger.com/share-post.g?blogID=221167718733428956&postID=6523709598230927409&target=facebook' onclick='window.open(this.href, "_blank", "height=430,width=640"); return false;' target='_blank' title='Share to Facebook'><span class='share-button-link-text'>Share to Facebook</span></a><a class='goog-inline-block share-button sb-pinterest' href='https://www.blogger.com/share-post.g?blogID=221167718733428956&postID=6523709598230927409&target=pinterest' target='_blank' title='Share to Pinterest'><span class='share-button-link-text'>Share to Pinterest</span></a> </div> </div> <div class='post-footer-line post-footer-line-2'> <span class='post-labels'> </span> </div> <div class='post-footer-line post-footer-line-3'> <span class='post-location'> </span> </div> </div> </div> </div> </div></div> <div class="date-outer"> <h2 class='date-header'><span>Wednesday, May 22, 2019</span></h2> <div class="date-posts"> <div class='post-outer'> <div class='post hentry uncustomized-post-template' itemprop='blogPost' itemscope='itemscope' itemtype='http://schema.org/BlogPosting'> <meta content='https://i.ytimg.com/vi/fmYtt7duuWc/0.jpg' itemprop='image_url'/> <meta content='221167718733428956' itemprop='blogId'/> <meta content='2149299821643016002' itemprop='postId'/> <a name='2149299821643016002'></a> <h3 class='post-title entry-title' itemprop='name'> <a href='http://qaiumer.blogspot.com/2019/05/get-details-report-by-clicking-or-check.html'>Get Details Report by Clicking or Check on Interactive Grid Master Report</a> </h3> <div class='post-header'> <div class='post-header-line-1'></div> </div> <div class='post-body entry-content' id='post-body-2149299821643016002' itemprop='description articleBody'> <title> 1. First create a interactive report on a table. Like select STD_ID, STD_NAME, ROLL_NO , CLASS_NAME from STUDENT_REG WHERE SECTION = :P57_SECTION AND UPPER(SCHOOL) = UPPER(:P0_SCHOOL_NAME) 2. Create a text field item like “P57_VAR” 3. Create a Dynamic Action on Event “Select Change Interactive Grid” and select respective selection type and region name. 4. Action > Execute JavaScript > var i, selectedIds=":" , model = this.data.model; for ( i = 0; i < this.data.selectedRecords.length; i++ ) { if (i>=0) { selectedIds += model.getValue( this.data.selectedRecords[i], "STD_ID") + ":"; } // ”STD_ID” is the unique key of the report else { selectedIds += model.getValue( this.data.selectedRecords[i], "STD_ID"); } } $s("P57_VAR", selectedIds); // "P57_VAR" is a item to preserve unique key to get another report data. apex.region("report").refresh(); // “report” is second report STATIC ID 5. Create report on same table with same condition. like select APEX_ITEM.display_and_save (03,STD_ID) STD_ID , STD_NAME, ROLL_NO , CLASS_NAME, --APEX_ITEM.CHECKBOX(02,'CHECKED','N') ATT_FLAG, APEX_ITEM.CHECKBOX(01,'#ROWNUM#','CHECKED') "Check" from STUDENT_REG where instr(:P57_VAR, ':' ||STD_ID|| ':' ) > 0 Now it may work… Maybe I can’t express the full cycle so try to understand your-self. Thank You.

1. First create a interactive report on a table. Like
select
    STD_ID,
    STD_NAME,
                ROLL_NO             ,
    CLASS_NAME
    from
    STUDENT_REG
WHERE    SECTION = :P57_SECTION
AND UPPER(SCHOOL) = UPPER(:P0_SCHOOL_NAME)

2. Create a text field item  like “P57_VAR”

3. Create a Dynamic Action on Event “Select Change Interactive Grid” and select respective selection type and region name.

4.  Action > Execute JavaScript >

var i, selectedIds=":" ,
    model = this.data.model;

for ( i = 0; i < this.data.selectedRecords.length; i++ ) {
    if (i>=0) {
    selectedIds += model.getValue( this.data.selectedRecords[i], "STD_ID") + ":"; } 

 // ”STD_ID” is the unique key of the report
    else
        {
    selectedIds += model.getValue( this.data.selectedRecords[i], "STD_ID");  
       }
}
$s("P57_VAR", selectedIds);

// "P57_VAR" is a item to preserve unique key to get another report data.

apex.region("report").refresh();

// “report” is second report STATIC ID

5. Create report on same table with same condition. like
select
    APEX_ITEM.display_and_save (03,STD_ID) STD_ID ,
    STD_NAME,
                ROLL_NO             ,
    CLASS_NAME,
    --APEX_ITEM.CHECKBOX(02,'CHECKED','N') ATT_FLAG,
    APEX_ITEM.CHECKBOX(01,'#ROWNUM#','CHECKED') "Check" 
  from
    STUDENT_REG
  where instr(:P57_VAR, ':' ||STD_ID|| ':' ) > 0

Now it may work…

Maybe I can’t express the full cycle so try to understand your-self.
Thank You.


Tuesday, May 21, 2019

Button in Report Manually in Oracle Apex

SELECT ID, NAME, '<input style="background-color: #85bbe7; color: black; font-weight: bold;" type="button" value="Upload">'Attachment, SCHOOL FROM TEST_TABLE; SELECT ID,
       NAME,
       '<input style="background-color: #85bbe7; color: black; font-weight: bold;" type="button" value="Upload">'Attachment,
       SCHOOL
FROM
TEST_TABLE;

Run Time Validation Or Validation From Dynamic Action By JavaScript in Oracle Apex

Run Time Validation Or Validation From Dynamic Action By JavaScript in Oracle Apex STEP-1: CREATE JS FUNCTION ON PAGE LEVEL JUST PASTE THE BELOW CODE function myerror(){ var myval = apex.item('P6_ERR').getValue();//document.getElementById('P6_ERR').value; apex.message.clearErrors(); apex.message.showErrors( [ { "type": "error", "location": "page", "message": myval }] ); } STEP-2: CALL THE FUNCTION ON ONCHANGE EVENT ON YOUR SPECIFIC ITEM ON CUSTOM ATTRIBUTE onchange="myerror();" STEP-3: CREATE A DYNAMIC ACTION ON CLICK OR AS YOU WISH PASTHE BELOW SAMPLE CODE EVENT: CLICK ACTION: EXECUTE PL/SQL CODE BEGIN IF LENGTH(:P6_NEW)>=10 THEN :P6_ERR :='Length must not exceed 10 digit....'; --RAISE_APPLICATION_ERROR(-20001,'Length must not exceed 4 digit....'); elsif LENGTH(:P6_NEW)>=5 THEN :P6_ERR :='Length must not exceed 4 digit....'; end if; exception when others then :P6_ERR :=SQLERRM; --RAISE_APPLICATION_ERROR(-20001,'Length must not exceed 4 digit'); END; STEP-1: CREATE JS FUNCTION ON PAGE LEVEL JUST PASTE THE BELOW CODE

function myerror(){
    var myval = apex.item('P6_ERR').getValue();//document.getElementById('P6_ERR').value;
    apex.message.clearErrors();
    apex.message.showErrors(
[
 {
  "type":     "error",
  "location": "page",
  "message": myval
}]
);
}

STEP-2: CALL THE FUNCTION ON ONCHANGE EVENT ON YOUR SPECIFIC ITEM ON CUSTOM ATTRIBUTE

onchange="myerror();"

STEP-3: CREATE A DYNAMIC ACTION ON CLICK OR AS YOU WISH PASTHE BELOW SAMPLE CODE
EVENT: CLICK
ACTION: EXECUTE PL/SQL CODE

BEGIN
IF LENGTH(:P6_NEW)>=10 THEN
:P6_ERR :='Length must not exceed 10 digit....';
--RAISE_APPLICATION_ERROR(-20001,'Length must not exceed 4 digit....');
elsif LENGTH(:P6_NEW)>=5 THEN
:P6_ERR :='Length must not exceed 4 digit....';
end if;
exception 
when others then
:P6_ERR :=SQLERRM;
--RAISE_APPLICATION_ERROR(-20001,'Length must not exceed 4 digit');
END;

Thursday, May 16, 2019

Work With apex_collection in Oracle Apex


Work With apex_collection in Oracle Apex 1. Create apex_collection : apex_collection.create_collection('NAME'); 2. Existence Check: apex_collection.collection_exists ('NAME'); 3. Add Member: apex_collection.add_member (p_collection_name => 'NAME', p_c001 => :P2_ITEM1, p_c002 => :P2_ITEM2, p_c003 => :P2_ITEM3); 4. Collection to Database table data transcfer: BEGIN FOR i IN ( SELECT c001 AS a, c002 AS b, c003 AS c FROM apex_collections WHERE collection_name = 'NAME' ORDER BY 1) LOOP INSERT INTO DATABASE_TABLE (COLUMN1, COLUMN2, COLUMN3) VALUES (i.a, i.b, i.c); END LOOP; COMMIT; END; 5. Truncate Collection: apex_collection.truncate_collection(p_collection_name => 'NAME'); 6. Delete Collection Member : apex_collection.delete_member( p_collection_name => collection name, p_seq => member sequence number); 7. Delete All Collecion Members: apex_collection.delete_members( p_collection_name => collection name, p_attr_number => number of attribute used to match for the specified attribute value for deletion, p_attr_value => attribute value of the member attribute used to match for deletion); 8. Delete Collection : apex_collection.delete_collection ( p_collection_name =>'NAME'); 1. Create apex_collection :
(Collection Name Must be in Capital letter)
apex_collection.create_collection('NAME');

2. Existence Check:

apex_collection.collection_exists ('NAME');

3. Add Member:

  apex_collection.add_member (p_collection_name   => 'NAME',
                                  p_c001              => :P2_ITEM1,
                                  p_c002              => :P2_ITEM2,
                                  p_c003              => :P2_ITEM3);
                               
4. Collection to Database table data transcfer:

BEGIN
   FOR i IN (  SELECT c001 AS a, c002 AS b, c003 AS c
                 FROM apex_collections
                WHERE collection_name = 'NAME'
             ORDER BY 1)
   LOOP
      INSERT INTO DATABASE_TABLE (COLUMN1, COLUMN2, COLUMN3)
           VALUES (i.a, i.b, i.c);
   END LOOP;

   COMMIT;
END; 

5. Truncate Collection:

apex_collection.truncate_collection(p_collection_name => 'NAME');   

6. Delete Collection Member :

apex_collection.delete_member(
    p_collection_name => collection name,
    p_seq             => member sequence number);    
 
7. Delete All Collecion Members:

apex_collection.delete_members(
    p_collection_name => collection name,
    p_attr_number     => number of attribute used to match for the                           specified
                         attribute value for deletion, 
    p_attr_value      => attribute value of the member attribute                             used to match for deletion); 
8. Delete Collection :

apex_collection.delete_collection (
    p_collection_name =>'NAME');                                           

Friday, May 10, 2019

Re Assign Oracle Table Column Without Delete Data From Table Using (Rebuild form TOAD)

Re Assign Oracle Table Column Without Delete Data From Table Using (Rebuild form TOAD) ***Table ->altermode->Rebuild-> Script-> Re Assign Column -> Finally Execute.*** -- ********************************************************************** -- Note: This rebuild script is not meant to be used when a possibility * -- exists that someone might try to access the table while it is * -- being rebuilt! If you need online table rebuilding and you * -- are on Oracle 10g or newer, use the dbms_redfinition wizard * -- under database -> optimize. (Requires DB Admin module) * -- * -- Locks are released when the first DDL, COMMIT or ROLLBACK is * -- performed, so adding a "Lock table" command at the top of this * -- script will not prevent others from accessing the table for * -- the duration of the script. * -- * -- One more important note: * -- This script will cause the catalog in replicated environments * -- to become out of sync. * -- ********************************************************************** -- Table Rebuild script generated by Toad -- -- Original table: TEST1 -- Backup of table: TEST1_X -- Date: 11/05/2019 12:48:57 ***Table ->altermode->Rebuild-> Script-> Re Assign Column -> Finally  Execute.***

--  **********************************************************************
--  Note: This rebuild script is not meant to be used when a possibility *
--        exists that someone might try to access the table while it is  *
--        being rebuilt!  If you need online table rebuilding and you    *
--        are on Oracle 10g or newer, use the dbms_redfinition wizard    *
--        under database -> optimize. (Requires DB Admin module)         *
--                                                                       *
--        Locks are released when the first DDL, COMMIT or ROLLBACK is   *
--        performed, so adding a "Lock table" command at the top of this *
--        script will not prevent others from accessing the table for    *
--        the duration of the script.                                    *
--                                                                       *
--   One more important note:                                            *
--        This script will cause the catalog in replicated environments  *
--        to become out of sync.                                         *
--  **********************************************************************

--  Table Rebuild script generated by Toad
--
--  Original table: TEST1
--  Backup of table: TEST1_X
--  Date: 11/05/2019 12:48:57

Saturday, May 4, 2019

String Moving

Region Type Static Content

String Moving

<font style="font-size: 20px;" color=#009688><marquee> Moving String tag !!! :)</marquee></font>
<title>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-q0OR5teN3wg/XM2-uXNYHCI/AAAAAAAAE6Q/rPdhey_P4BcBX_48L_BS11r9vsse6U21QCLcBGAs/s1600/movingtag.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="244" data-original-width="1340" height="115" src="https://4.bp.blogspot.com/-q0OR5teN3wg/XM2-uXNYHCI/AAAAAAAAE6Q/rPdhey_P4BcBX_48L_BS11r9vsse6U21QCLcBGAs/s640/movingtag.gif" width="640" /></a></div>
<br />
<u>Region Type Static Content </u><br />
<br />
<font style="font-size: 20px;" color=#009688><marquee> Moving String tag !!! :)</marquee></font>
Region Type Static Content String Moving <font style="font-size: 20px;" color=#009688><marquee> Moving String tag !!! :)</marquee></font> <title> <div class="separator" style="clear: both; text-align: center;"> <a href="https://4.bp.blogspot.com/-q0OR5teN3wg/XM2-uXNYHCI/AAAAAAAAE6Q/rPdhey_P4BcBX_48L_BS11r9vsse6U21QCLcBGAs/s1600/movingtag.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="244" data-original-width="1340" height="115" src="https://4.bp.blogspot.com/-q0OR5teN3wg/XM2-uXNYHCI/AAAAAAAAE6Q/rPdhey_P4BcBX_48L_BS11r9vsse6U21QCLcBGAs/s640/movingtag.gif" width="640" /></a></div> <br /> <u>Region Type Static Content </u><br /> <br /> <font style="font-size: 20px;" color=#009688><marquee> Moving String tag !!! :)</marquee></font>

How to open region as modal and pass a value from report or item.

1. Create report and take a column as link.
2. Create another region for modal and put a static ld like ‘m’
3. Then Link -> Target -> URL type and wright the code like this one.

Here  P1_ID is the item where you want to assign the value and #ID# is report value.
And  ‘m’ is the static id of modal region and this region template should be Inline Dialog .
javascript:$s('P1_ID','#ID#','#ID#'); javascript:openModal('m');

Restrict File Upload by File Type in Oracle Apex

If you want to restrict file upload by file type/extension/format you can follow the below steps.  Goto File Browser Item --> Advanced --...