Results 1 to 5 of 5

Thread: I Got Error!

  1. #1
    Join Date
    Mar 2004
    Posts
    7

    Unanswered: I Got Error!

    I am trying to solve run this PL/SQL blocks and I am getting an error that isql * plus command don't have accpet command. can anyone give me the correct code?

    This is my scripts;
    ============
    ACCEPT P_NUM1 PROMPT 'Please enter the first number:'
    ACCEPT P_NUM2 PROMPT 'Please enter the second number:'
    DECLARE
    V_NUM1 NUMBER(9,2) := &P_NUM1;
    V_NUM2 NUMBER(9,2) := &P_NUM2;
    V_RESULT NUMBER(9,2);
    BEGIN
    V_RESULT := (V_NUM1/V_NUM2) + V_NUM2;
    /* PRINTING THE PL/SQL VARIABLE */
    DBMS_OUTPUT.PUT_LINE (V_RESULT);
    END;
    ==============

    Error message:
    =========

    SP2-0850: Command "accept" is not available in iSQL*Plus
    SP2-0850: Command "accept" is not available in iSQL*Plus
    old 2: V_NUM1 NUMBER(9,2) := &P_NUM1;
    new 2: V_NUM1 NUMBER(9,2) := 12;
    old 3: V_NUM2 NUMBER(9,2) := &P_NUM2;
    new 3: V_NUM2 NUMBER(9,2) := 6;
    PL/SQL procedure successfully completed.

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    Either do not use iSQL or don't use accept.
    They are mutually exclusive.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Mar 2004
    Posts
    7
    Thanks for that quick reply. What would be the alternative command instead of ACCEPT if I want to use iSQL?

  4. #4
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    SQL*Plus
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  5. #5
    Join Date
    Jan 2004
    Location
    Scottsdale, AZ
    Posts
    106

    Angry

    "Take Control!
    Make The Choice!
    Accept The Consequences!
    Deal With The Results! "

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •