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
Continue with Google
or use


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
Continue with Google
or use

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.

Continue with Google
or use

Forgot Password?

Need An Account, Sign Up Here

You must login to ask a question.

Continue with Google
or use

Forgot Password?

Need An Account, Sign Up Here

Sorry, you do not have permission to add post.

Continue with Google
or use

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
Ask A Question
  • Categories
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Dev Tools
    • Online Compiler
    • Base64 Converter
    • Oraask XML Formatter
    • Oraask JSON Formatter
  • Wiki
    • SQL Tutorials
    • Java Tutorials
    • Python Tutorials
    • JavaScript Tutorials

isouravghosh

Juniorisouravghosh
Ask isouravghosh
118 Visits
3 Followers
0 Questions
Home/ isouravghosh/Followers Answers
  • About
  • Questions
  • Answers
  • Best Answers
  • Posts
  • Polls
  • Asked Questions
  • Followed
  • Favorites
  • Comments
  • Followers Questions
  • Followers Answers
  • Followers Posts
  • Followers Comments
  1. Asked: August 1, 2016In: PL/SQL

    Can i use select statement inside if statement ? (if (select) > 0 then) ?

    Hassan AbdElrahman
    Best Answer
    Hassan AbdElrahman Master Oracle ACE Pro Alum ♠ | Oracle Senior ERP Technical Consultant
    Added an answer on August 19, 2016 at 10:34 pm

    hello Beter, you can't use SQL Statement directly in a PL/SQL expression instead you can use variable to store your count then use your variable into PL/SQL expression like this : DECLARE  v_count   NUMBER;BEGIN  SELECT count (*) INTO v_count FROM dual;  IF v_count >= 1 THEN    dbms_output.put_liRead more

    hello Beter,
    you can’t use SQL Statement directly in a PL/SQL expression instead you can use variable to store your count then use your variable into PL/SQL expression like this :

    DECLARE
      v_count   NUMBER;
    BEGIN
      SELECT count (*) INTO v_count FROM dual;

      IF v_count >= 1 THEN
        dbms_output.put_line ('true');
      ELSE
        dbms_output.put_line ('false');
      END IF;
    END;

    or as you mentioned if you want to use it inside delete statement like this :

    DELETE FROM table_1
    WHERE       (SELECT count (*) FROM table_2) >= 1;

    hope this helpful 🙂

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  2. Asked: August 16, 2016In: Oracle SQL

    How to Insert data include symbol '&' into a table ?

    Hassan AbdElrahman
    Hassan AbdElrahman Master Oracle ACE Pro Alum ♠ | Oracle Senior ERP Technical Consultant
    Added an answer on August 16, 2016 at 10:07 pm

    it's very simple just using this : set define off insert into table values ('& yourvalues'); and then press 'F5' to execute the above commands. also from sqlplus you can use this : set define off

    it’s very simple just using this :

    set define off
    insert into table values ('& yourvalues');

    and then press ‘F5’ to execute the above commands.
    also from sqlplus you can use this :
    set define off

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

    How can i convert CLOBS TO VARCHAR2 column ?

    Hassan AbdElrahman
    Hassan AbdElrahman Master Oracle ACE Pro Alum ♠ | Oracle Senior ERP Technical Consultant
    Added an answer on August 14, 2016 at 9:24 pm

    hello Beter, you can use dbms_lob.substr( clob_column, for_how_many_bytes, from_which_byte ); and here basic two example : first by using SQL but note the max length is 4000 characters: select dbms_lob.substr( clob_col, 4000, 1 ) from Tablename; second by using PL/SQL max length is 32000 charactersRead more

    hello Beter,
    you can use

    dbms_lob.substr( clob_column, for_how_many_bytes, from_which_byte );

    and here basic two example :
    first by using SQL but note the max length is 4000 characters:

    select dbms_lob.substr( clob_col, 4000, 1 ) from Tablename;

    second by using PL/SQL max length is 32000 characters :

    DECLARE
      var1   LONG;
    BEGIN
      FOR i IN (SELECT clob_col FROM tablename)
      LOOP
        var1 := dbms_lob.substr (i.clob_col, 32000, 1);
      END LOOP;
    END;

    hope this may help.
    you can refer to DBMS_LOB from oracle

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  4. Asked: August 13, 2016In: Oracle Forms

    Load image

    Hassan AbdElrahman
    Hassan AbdElrahman Master Oracle ACE Pro Alum ♠ | Oracle Senior ERP Technical Consultant
    Added an answer on August 13, 2016 at 9:09 pm
    This answer was edited.

    firstly, try to read more about the webutil library.second, find below a basic code snippet to do the job: --this code to open uploading dialog box V_CLIENT_PATH := CLIENT_GET_FILE_NAME(DIRECTORY_NAME => NULL ,FILE_NAME => NULL ,FILE_FILTER => 'ALL FILES (*.*)|*.*' ,MESSAGE => 'Open a fiRead more

    firstly, try to read more about the webutil library.
    second, find below a basic code snippet to do the job:

    --this code to open uploading dialog box
    
        V_CLIENT_PATH := CLIENT_GET_FILE_NAME(DIRECTORY_NAME => NULL
                                     ,FILE_NAME    => NULL
                                     ,FILE_FILTER  => 'ALL FILES (*.*)|*.*'
                                     ,MESSAGE      => 'Open a file'
                                     ,DIALOG_TYPE  => NULL
                                     ,SELECT_FILE  => NULL);
    
        -- create directory on local machine at client server
        HOST ( 'cmd /c mkdir'||' "'|| 'C:tempapplication' || '"',NO_SCREEN); 
    
    -- this code to show uploading progress to user
        V_SUCCESS := 
    WEBUTIL_FILE_TRANSFER.CLIENT_TO_AS_WITH_PROGRESS
        (CLIENTFILE       => V_CLIENT_PATH
        ,SERVERFILE       => V_SERVER_PATH
        ,PROGRESSTITLE    => 'Uploading file in progress'
        ,PROGRESSSUBTITLE => 'Please wait'
       ,ASYNCHRONOUS     => FALSE
       ,CALLBACKTRIGGER  => NULL);

    hope this may help 🙂

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  5. Asked: July 17, 2016In: Java

    How to add ' "single quotes" for string using Java?

    Hassan AbdElrahman
    Hassan AbdElrahman Master Oracle ACE Pro Alum ♠ | Oracle Senior ERP Technical Consultant
    Added an answer on July 20, 2016 at 7:54 pm

    hello beter, basically if you want to add single code to any string you can use : /' "any string you want here" /' and if you want to use it inside sql statement hence you are building VO at run time (onthefly :)) so you can write : SELECT column1 FROM table WHERE column2 = + "'"+ Vstr+"'"; where VsRead more

    hello beter,
    basically if you want to add single code to any string you can use :

    /' "any string you want here" /'

    and if you want to use it inside sql statement hence you are building VO at run time (onthefly :)) so you can write :

    SELECT column1 FROM table WHERE column2 = + "'"+ Vstr+"'";

    where Vstr is your String variable in your example.
     
    hope this helpful 🙂
    share today to gain tomorrow.

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  6. Asked: July 11, 2016In: Oracle Reports

    How to pass date parameter to oracle report builder ?

    Hassan AbdElrahman
    Best Answer
    Hassan AbdElrahman Master Oracle ACE Pro Alum ♠ | Oracle Senior ERP Technical Consultant
    Added an answer on July 11, 2016 at 12:38 pm

    hello albert,  your code is correct can you write what is the error exactly to help you. in addition you can check your user parameter  in your report builder property specifically these properties mentioned in below image

    hello albert,
     your code is correct can you write what is the error exactly to help you.
    in addition you can check your user parameter  in your report builder property specifically these properties mentioned in below image
    pass date parameter to report builder

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

    how can I know reserved words in oracle ?

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

    just execute this query to list all oracle reserved words select *from v$reserved_wordswhere reserved = 'Y' hope this helpful :) share with others to stretch our experiences

    just execute this query to list all oracle reserved words

    select *
    from v$reserved_words
    where reserved = 'Y'

    hope this helpful 🙂
    share with others to stretch our experiences

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

    How to Send e-mail from PL/SQL ?

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

    hi there,starting from oracle 8i we are eligible to send emails directly from PL/SQL by using either UTL_SMTP or UTL_TCP packages. However, oracle provides us valuable package called UTL_MAIL for sending emails in Oracle 10g.here is example of how to use UTL_MAIL to send emails from PL/SQL : BEGIN ERead more

    hi there,

    starting from oracle 8i we are eligible to send emails directly from PL/SQL by using either UTL_SMTP or UTL_TCP packages. However, oracle provides us valuable package called UTL_MAIL for sending emails in Oracle 10g.

    here is example of how to use UTL_MAIL to send emails from PL/SQL :

    BEGIN
      EXECUTE IMMEDIATE 'ALTER SESSION SET smtp_out_server = ''127.0.0.1''';
      UTL_MAIL.send(sender => 'me@address.com',
                recipients => 'you@address.com',
                   subject => 'Test Mail',
                   message => 'Hello World',
                 mime_type => 'text; charset=us-ascii');
    END;

    Note : for security purpose, UTL_MAIL is not enabled by default. so you should enable it by connecting to SYS user and executing the utlmail.sql and prvtmail.plb scripts in the $ORACLE_HOME/RDBMS/admin directory. In addition, you must configure an initialization parameter, SMTP_OUT_SERVER, to point to an outgoing SMTP server.
    in addition, you must give EXECUTE permission to PUBLIC by run below script :

    grant execute on UTL_MAIL to public

    hope this helpful 🙂
    share with others to stretch our experiences

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  9. 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 Alum ♠ | 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
  10. 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 Alum ♠ | 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
1 … 16 17 18 19

Sidebar

Adv 250x250

Explore

  • Categories
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Dev Tools
    • Online Compiler
    • Base64 Converter
    • Oraask XML Formatter
    • Oraask JSON Formatter
  • 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.