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

Hassan AbdElrahman

MasterOracle ACE Pro Alum ♠ | Oracle Senior ERP Technical Consultant
Ask Hassan AbdElrahman
1k Visits
29 Followers
0 Questions
Home/ Hassan AbdElrahman/Answers
  • About
  • Questions
  • Answers
  • Best Answers
  • Posts
  • Polls
  • Asked Questions
  • Comments
  1. Asked: September 9, 2016In: Oracle Application Framework - OAF

    java.sql.SQLException: Invalid column type Error when extending a VO

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

    What you need to change is the Binding Style from Oracle Named to Oracle Positional in the View Object declaration. The framework is adding a where clause to the query using bind variables that are typed :n, this is why you need to set Oracle Positional.

    What you need to change is the Binding Style from Oracle Named to Oracle Positional in the View Object declaration. The framework is adding a where clause to the query using bind variables that are typed :n, this is why you need to set Oracle Positional.

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

    how to create dynamic tables ,columns, and datatype for each column in oracle ?

    Hassan AbdElrahman
    Hassan AbdElrahman Master Oracle ACE Pro Alum ♠ | Oracle Senior ERP Technical Consultant
    Added an answer on August 27, 2016 at 7:28 am

    hello @Tiwari Sandeep what i meant is i want create table at run time like create table tablename (col1 varchar2(50), col2 number); actually we can do this by dynamic SQL but it's unfortunately not recommended by oracle because this will open a loophole for hackers by (SQL INJECTION) if you have anyRead more

    hello @Tiwari Sandeep what i meant is i want create table at run time like

    create table tablename (col1 varchar2(50), col2 number);

    actually we can do this by dynamic SQL but it’s unfortunately not recommended by oracle because this will open a loophole for hackers by (SQL INJECTION) if you have any idea to avoid this will be very appreciated

    thank you for your reply.

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

    How to Raise User-Defined Exception and display Custom SQLERRM ?

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

    you can do this by using : RAISE_APPLICATION_ERROR function and here simple example for you : DECLARE custom_ex EXCEPTION; PRAGMA EXCEPTION_INIT (custom_ex, -20001); BEGIN raise_application_error (-20001, 'Your custom error message here'); EXCEPTION WHEN custom_ex THEN dbms_output.put_line (sqlerrm)Read more

    you can do this by using : RAISE_APPLICATION_ERROR function and here simple example for you :

    DECLARE
      custom_ex   EXCEPTION;
      PRAGMA EXCEPTION_INIT (custom_ex, -20001);
    BEGIN
      raise_application_error (-20001, 'Your custom error message here');
    EXCEPTION
      WHEN custom_ex THEN
        dbms_output.put_line (sqlerrm);
    END;

    the output would be : ” ORA-20001: Your custom error message here ” .
    hope this help 🙂

    See less
      • 1
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  4. Asked: July 31, 2016In: PL/SQL

    How to know number of rows updated by UPDATE statement ?

    Hassan AbdElrahman
    Hassan AbdElrahman Master Oracle ACE Pro Alum ♠ | Oracle Senior ERP Technical Consultant
    Added an answer on August 21, 2016 at 1:56 pm

    SQL%ROWCOUNT :  return the number of rows fetched/processed by the last DML executed. If the DML fails after fetching 1 row, due to any reason, SQL%ROWCOUNT will return only 1, the number of rows fetched/processed so far basically you can use : BEGIN  UPDATE xx_test_tab  SET    test_col = 777777  WHRead more

    SQL%ROWCOUNT :  return the number of rows fetched/processed by the last DML executed. If the DML fails after fetching 1 row, due to any reason, SQL%ROWCOUNT will return only 1, the number of rows fetched/processed so far
    basically you can use :

    BEGIN
      UPDATE xx_test_tab
      SET    test_col = 777777
      WHERE  col2 LIKE '2%';

      DBMS_OUTPUT.PUT_LINE(TO_Char(SQL%ROWCOUNT)||' rows affected.');
    END;

    hope this help 🙂

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  5. 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
  6. 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
  7. 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
  8. 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
  9. 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
  10. 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
1 … 13 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
    • 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.