Sign Up

Sign Up to our social questions and Answers to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In


Have an account? Sign In Now

Sign In

Login to our social questions & Answers to ask questions, answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Sorry, you do not have permission to add post.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Oraask Logo Oraask Logo
Sign InSign Up

Oraask

  • Write
    • Add A New Post
    • Ask A Question

Oraask Navigation

Search
Ask A Question

Mobile menu

Close
  • Categories
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Dev Tools
    • Online Compiler
    • Base64 Converter
  • Wiki
    • SQL Tutorials
    • Java Tutorials
    • Python Tutorials
    • JavaScript Tutorials

Walaa Mohamed

Junior
Ask Walaa Mohamed
47 Visits
3 Followers
0 Questions
Home/ Walaa Mohamed/Followers Answers
  • About
  • Questions
  • Answers
  • Best Answers
  • Posts
  • Polls
  • Asked Questions
  • Followed
  • Favorites
  • Comments
  • Followers Questions
  • Followers Answers
  • Followers Posts
  • Followers Comments
  1. Asked: June 14, 2016In: PL/SQL

    How to read excel file from oracle pl/sql ?

    Hassan AbdElrahman
    Best Answer
    Hassan AbdElrahman Master Oracle ACE Pro ♠ | Oracle Senior ERP Technical Consultant
    Added an answer on June 19, 2016 at 9:03 am

    first thing data must be saved as extension .CSV not .xls second we need to create directory and give (EXECUTE, READ, WRITE) privilege to appropriate user which will use this directory later into procedure we will create create directory syntax CREATE OR REPLACE DIRECTORY TEMP_DIR AS 'C:temp'; GRANTRead more

    first thing data must be saved as extension .CSV not .xls
    second we need to create directory and give (EXECUTE, READ, WRITE) privilege to appropriate user which will use this directory later into procedure we will create
    create directory syntax

    CREATE OR REPLACE DIRECTORY 
    TEMP_DIR AS 
    'C:temp';
    GRANT EXECUTE, READ, WRITE ON DIRECTORY TEMP_DIR TO USER WITH GRANT OPTION;

    Note : “C:temp” this statement to create directory on windows server it will be little deference from Linux server.
    third thing you need to create stage table which we will insert data into it by mapping excel column to be the same with columns name :

    CREATE TABLE DOCARCH.TEST
    (
      TYPE_ID       NUMBER
    )

    and now it’s time to read the data inside csv file and inserted to stage table by this procedure

    create or replace procedure imp_proc_test
    is
      file_handle   utl_file.file_type := UTL_FILE.FOPEN('TEMP_DIR','imptestdata.csv','R',5000);
      var1          test.TYPE_ID%type;
      v_string      varchar2 (1000);
    begin
        loop
            begin
            UTL_FILE.get_line(file_handle,v_string);
            var1 := substr(v_string,1,instr(v_string,',',1,1)-1);
            insert into test (TYPE_ID) values (var1);
            exception
              when no_data_found then
                  UTL_FILE.fclose (file_handle);
                  exit;
               WHEN OTHERS THEN
                 DBMS_OUTPUT.PUT_LINE(sqlcode||sqlerrm);
            end;
        end loop;
        commit;
    end;

    so now after created this procedure just call it by :

    exec imp_proc_test

    at the final there is too many ways to achieve this requirement but we pick easiest one for you so please if you have any addition just share with others here.

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  2. Asked: June 12, 2016In: Oracle E-Business Suite

    what is FNDLOAD commands to download and upload forms personalization ?

    Hassan AbdElrahman
    Hassan AbdElrahman Master Oracle ACE Pro ♠ | Oracle Senior ERP Technical Consultant
    Added an answer on June 19, 2016 at 7:15 am

    FNDLOAD command for downloading personalization in form : FNDLOAD user/pass 0 Y DOWNLOAD $FND_TOP/patch/115/import/affrmcus.lct PO_POXSCERQ_PERSONALIZ.ldt FND_FORM_CUSTOM_RULES function_name="PO_POXSCERQ" user : this your instance user name pass : this your instance password PO_POXSCERQ_PERSONALIZ.lRead more

    FNDLOAD command for downloading personalization in form :

    FNDLOAD user/pass 0 Y DOWNLOAD $FND_TOP/patch/115/import/affrmcus.lct PO_POXSCERQ_PERSONALIZ.ldt FND_FORM_CUSTOM_RULES function_name="PO_POXSCERQ"

    user : this your instance user name
    pass : this your instance password
    PO_POXSCERQ_PERSONALIZ.ldt : this generated file after download rename appropriate name
    PO_POXSCERQ : this function name which you want to download all personalization from.

    just after you run above command LDT file will generated in home directory just take this LDT file and copy it to another home instance then

    FNDLOAD command for uploading personalization in form :

    FNDLOAD user/pass 0 Y UPLOAD $FND_TOP/patch/115/import/affrmcus.lct PO_POXSCERQ_PERSONALIZ.ldt

    hope this helpful 🙂

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  3. Asked: June 18, 2016In: Oracle SQL

    How can i Update a table by data in another table ?

    Hassan AbdElrahman
    Hassan AbdElrahman Master Oracle ACE Pro ♠ | Oracle Senior ERP Technical Consultant
    Added an answer on June 18, 2016 at 11:06 am

    This called correlated update you can find examples below UPDATE TABLE(<SELECT STATEMENT>) <alias1> SET <column_1> = (   SELECT <column_1>   FROM <table_2> <alias2>   WHERE <alias2.table_name> = <alias1.table_name>); in you sample : UPDATE table1 t1   Read more

    This called correlated update you can find examples below

    UPDATE TABLE(<SELECT STATEMENT>) <alias1>
    SET <column_1> = (
      SELECT <column_1>
      FROM <table_2> <alias2>
      WHERE <alias2.table_name> = <alias1.table_name>);

    in you sample :

    UPDATE table1 t1
       SET (name, desc) = (SELECT t2.name, t2.desc
                             FROM table2 t2
                            WHERE t1.id = t2.id)
     WHERE EXISTS (
        SELECT 1
          FROM table2 t2
         WHERE t1.id = t2.id )

    alternative way you can do this

    UPDATE (SELECT t1.id, 
                   t1.name name1,
                   t1.desc desc1,
                   t2.name name2,
                   t2.desc desc2
              FROM table1 t1,
                   table2 t2
             WHERE t1.id = t2.id)
       SET name1 = name2,
           desc1 = desc2
    
    

    and now the final example is

    UPDATE Table1 T1 SET
    T1.name = (SELECT T2.name FROM Table2 T2 WHERE T2.id = T1.id),
    T1.desc = (SELECT T2.desc FROM Table2 T2 WHERE T2.id = T1.id)
    WHERE T1.id IN (SELECT T2.id FROM Table2 T2 WHERE T2.id = T1.id);
    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  4. Asked: June 14, 2016In: Oracle SQL

    How to combine “LIKE” and “IN” condition in sql ?

    Hassan AbdElrahman
    Hassan AbdElrahman Master Oracle ACE Pro ♠ | Oracle Senior ERP Technical Consultant
    Added an answer on June 17, 2016 at 8:35 pm

    There is no combination of LIKE & IN in SQL, but you can use REGEXP_LIKE condition it's similar LIKE condition, except REGEXP_LIKE performs regular expression matching instead of the simple pattern matching performed by LIKE. Also this condition evaluates strings using characters as defined by iRead more

    There is no combination of LIKE & IN in SQL, but you can use REGEXP_LIKE condition it’s similar LIKE condition, except REGEXP_LIKE performs regular expression matching instead of the simple pattern matching performed by LIKE. Also this condition evaluates strings using characters as defined by input character set.
    Example 1 :

    select first_name from employees where regexp_like (first_name,'^Walker|Ken|^Mr')

    First Name

    Walker, Mr. Kenneth (Ken)

    Example 2 :

    SELECT first_name
    FROM employees
    WHERE REGEXP_LIKE (first_name, '^Ste(v|ph)en$');

    FIRST_NAME

    Steven

    Stephen

    Example 3 :

    SELECT last_name
    FROM employees
    WHERE REGEXP_LIKE (last_name, '([aeiou])1', 'i');

    LAST_NAME

    De Haan

    Greene

    Bloom

    Feeney

     

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  5. Asked: June 14, 2016In: PL/SQL

    how can i use one cursor inside two or more procedure in oracle pl/sql?

    Hassan AbdElrahman
    Hassan AbdElrahman Master Oracle ACE Pro ♠ | Oracle Senior ERP Technical Consultant
    Added an answer on June 17, 2016 at 6:55 pm

    The only way to achieve this is trying to declare that cursor in the package level then you can use it in any procedure or function in that package and the logic behind that is any cursor delcared in any function or procedure the scope for this cursor is only in that function below you can find sampRead more

    The only way to achieve this is trying to declare that cursor in the package level then you can use it in any procedure or function in that package and the logic behind that is any cursor delcared in any function or procedure the scope for this cursor is only in that function below you can find sample example :

    package body my_pkg is

       cursor test_cur is select * from table;

       procedure proc1 is
       begin
          open test_cur;
          ...
          close test_cur;
       end proc1;

       procedure proc2 is
       begin
          open test_cur;
          ...
          close test_cur;
       end proc2;
    end;


    Note: keep in mind in that example below if you open declared cursor in procedure 1 and you didn’t close it if you trying to open the same cursor in the procedure 2 you will get an exception raising

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  6. Asked: June 14, 2016In: Oracle SQL

    What is the difference between varchar and varchar2 data type?

    Hassan AbdElrahman
    Hassan AbdElrahman Master Oracle ACE Pro ♠ | Oracle Senior ERP Technical Consultant
    Added an answer on June 15, 2016 at 10:45 pm

    Currently VARCHAR behaves exactly the same as VARCHAR2. However, this type should not be used as it is reserved for future usage VARCHAR is reserved by Oracle to support distinction between NULL and empty string in future, as ANSI standard prescribes. VARCHAR2 does not distinguish between a NULL andRead more

    Currently VARCHAR behaves exactly the same as VARCHAR2. However, this type should not be used as it is reserved for future usage
    VARCHAR is reserved by Oracle to support distinction between NULL and empty string in future, as ANSI standard prescribes.
    VARCHAR2 does not distinguish between a NULL and empty string, and never will.
    If you rely on empty string and NULL being the same thing, you should use VARCHAR2

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  7. Asked: June 15, 2016In: Oracle SQL

    How to check whether partitioning enabled or not in my database ?

    Hassan AbdElrahman
    Hassan AbdElrahman Master Oracle ACE Pro ♠ | Oracle Senior ERP Technical Consultant
    Added an answer on June 15, 2016 at 8:19 am

    we need to execute this select statement to check select * from v$option where parameter = 'Partitioning'; PARAMETER VALUE Partitioning TRUE

    we need to execute this select statement to check

    select * from v$option where parameter = 'Partitioning';
    PARAMETER VALUE
    Partitioning TRUE
    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  8. Asked: June 14, 2016In: Oracle SQL

    how to concatenate two string or two values in oracle sql ?

    Hassan AbdElrahman
    Hassan AbdElrahman Master Oracle ACE Pro ♠ | Oracle Senior ERP Technical Consultant
    Added an answer on June 14, 2016 at 11:40 pm

    It is ||, for example: select 'Mr ' || emp_name from employees; or concatenate two column values by : select first_name || '-' || last_namefrom employees;

    It is ||, for example:

    select 'Mr ' || emp_name from employees;

    or concatenate two column values by :

    select first_name || '-' || last_name
    from employees;
    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  9. Asked: June 13, 2016In: PL/SQL

    How to create array variable in oracle pl/sql ?

    Hassan AbdElrahman
    Hassan AbdElrahman Master Oracle ACE Pro ♠ | Oracle Senior ERP Technical Consultant
    Added an answer on June 14, 2016 at 7:25 pm

    Basically VARRAY is varying array type that is typically used when the number of instances to be stored is small that means if we have one customer and this customer have number of phone numbers in our case if we know exact how many phone number he has so we will use VARRAY otherwise we will go forRead more

    Basically VARRAY is varying array type that is typically used when the number of instances to be stored is small that means if we have one customer and this customer have number of phone numbers in our case if we know exact how many phone number he has so we will use VARRAY otherwise we will go for using nested tables.
    You can use VARRAY data type for:

    1. A column in a relational table
    2. A PL/SQL variable
    3. A PL/SQL parameter of procedure or function
    4. A PL/SQL function return type
    5. A data attribute of an object type

    Now We can use VARRAY for a fixed-size array

    declare
       type array_t is varray(3) of varchar2(10);
       array array_t := array_t('Matt', 'Joanne', 'Robert');
    begin
       for i in 1..array.count loop
           dbms_output.put_line(array(i));
       end loop;
    end;

    Or TABLE for an unbounded array like:

    type array_t is table of varchar2(10);

    for clarification we submit question and it’s answer to help others, please if you have any addition don’t hesitate to share with others here.

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  10. Asked: June 12, 2016In: Oracle E-Business Suite

    Download MD50 document

    Hassan AbdElrahman
    Hassan AbdElrahman Master Oracle ACE Pro ♠ | Oracle Senior ERP Technical Consultant
    Added an answer on June 12, 2016 at 9:59 pm

    hi you can download it from here Click here also you can find MD70 & MD120 with explanation for each document here   AIM Documents (MD50, MD70 and MD120) Templates – Download now

    hi you can download it from here Click here
    also you can find MD70 & MD120 with explanation for each document here
     
    AIM Documents (MD50, MD70 and MD120) Templates – Download now

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
1 … 14 15 16 17

Sidebar

Adv 250x250

Explore

  • Categories
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Dev Tools
    • Online Compiler
    • Base64 Converter
  • Wiki
    • SQL Tutorials
    • Java Tutorials
    • Python Tutorials
    • JavaScript Tutorials

Footer

Oraask

About

Oraask is a website for developers and software engineers who want to learn new skills, share their knowledge, and solve their coding problems. Oraask provides free content on various programming languages and topics, such as Oracle, Python, Java, etc. Oraask also allows users to ask questions and get answers from other members of the community.

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy
  • Terms & Conditions

Follow

Oraask is licensed under CC BY-NC-SA 4.0Oraask CopyrightOraask CopyrightOraask CopyrightOraask Copyright

© 2019 Oraask. All Rights Reserved
With Love by Oraask.