Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2003
    Location
    Bangalore
    Posts
    44

    Unanswered: Error While Executing PL/SQL

    Hi Everybody,
    Can anybody help me with this problem. I am using oracle 8.1.7 version.
    I am trying to execute a PL/SQL block. I am getting the following error.
    Here i am sending the PL/SQL code and the error.

    declare
    a date;
    begin
    select (select sysdate from dual)
    into a
    from dual;
    end;
    /


    select (select sysdate from dual)
    *
    ERROR at line 5:
    ORA-06550: line 5, column 9:
    PLS-00103: Encountered the symbol "SELECT" when expecting one of the
    following:
    ( - + mod not null others <an identifier>
    <a double-quoted delimited-identifier> <a bind variable> avg
    count current exists max min prior sql stddev sum variance
    execute forall time timestamp interval date
    <a string literal with character set specification>
    <a number> <a single-quoted SQL string>
    ORA-06550: line 6, column 1:
    PLS-00103: Encountered the symbol "INTO" when expecting one of the
    following:
    ; return returning and or

    Thanks in advance
    Mahesh

  2. #2
    Join Date
    Jul 2003
    Posts
    2,296
    why not name a variable what it is instead of jibberish.
    You don't need a subquery in the select clause.

    select sysdate
    into v_date
    from dual;
    - The_Duck
    you can lead someone to something but they will never learn anything ...

  3. #3
    Join Date
    Jan 2003
    Location
    Bangalore
    Posts
    44
    Originally posted by The_Duck
    why not name a variable what it is instead of jibberish.
    You don't need a subquery in the select clause.

    select sysdate
    into v_date
    from dual;
    Hi ,
    Actually my requiremnt is similar like this, I am writing a select statement inside the select statement, its not from sysdate from dual, its actually some other column from another table.

    Thanks
    Mahesh

  4. #4
    Join Date
    Jul 2003
    Posts
    2,296
    fantastic.

    could you please run the real proc and post the proc with the output from pl/sql?

    You main problem in your select is that you are not selecting anything in the outside query. So why bother having the subquery? You need to select something besides the subquery or else you should not bother with the subquery.

    outside =
    "select <no columns/subquery>
    into a
    from dual"

    thanks.
    - The_Duck
    you can lead someone to something but they will never learn anything ...

  5. #5
    Join Date
    Jan 2003
    Location
    Bangalore
    Posts
    44
    Originally posted by The_Duck
    fantastic.

    could you please run the real proc and post the proc with the output from pl/sql?

    You main problem in your select is that you are not selecting anything in the outside query. So why bother having the subquery? You need to select something besides the subquery or else you should not bother with the subquery.

    outside =
    "select <no columns/subquery>
    into a
    from dual"

    thanks.
    Hi,
    Here i am sending u my code and the result what i am getting.


    Thanks in Advance
    Mahesh
    Attached Files Attached Files

Posting Permissions

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