Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2007
    Posts
    64

    Thumbs down Unanswered: VALUES (PATH) INTO statement in Oracle

    Hi ,

    Is there any equivalent for DB2's VALUES INTO clause in Oracle .
    IBM Information Management Software for z/OS Solutions Information Center

    Example ::
    DB2:
    EXEC SQL VALUES(CURRENT PATH) INTO :VARIABLE1
    Thanks ,
    Sush

  2. #2
    Join Date
    Feb 2009
    Posts
    62
    What sort of variables do they set?

    In pl/sql you can just assign variables directly:
    Code:
    DECLARE
      v_temp   varchar2(10);
    BEGIN
      v_temp := 'ABCDE';
    END;
    In SQL*Plus you can define substitution variable with DEFINE:
    Code:
    SQL> define variable1 = 'value'
    SQL> select '&variable1' from dual;
    old   1: select '&variable1' from dual
    new   1: select 'value' from dual
    
    'VALU
    -----
    value
    In SQL*Plus you can define Bind variables:
    Code:
    SQL> variable bind_var  varchar2(30);
    SQL> begin
      2    :bind_var := 'bind value';
      3  end;
      4  /
    
    PL/SQL procedure successfully completed.
    
    SQL> set serveroutput on size 10000
    SQL> begin
      2  dbms_output.put_line(:bind_var);
      3  end;
      4  /
    bind value
    
    PL/SQL procedure successfully completed.

  3. #3
    Join Date
    Aug 2007
    Posts
    64
    DB2 :
    Example 1: Assign the value of the CURRENT PATH special register to host variable HV1.

    EXEC SQL VALUES(CURRENT PATH) INTO :HV1;

    So this statement will assign a special register to a host Variable .

    Is there anything similar statement in Oracle

  4. #4
    Join Date
    Feb 2009
    Posts
    62
    That depends - what does a DB2 Host Variable do, and what do you mean by 'assign a special register'?

  5. #5
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Cool Sys_context()

    Check out SYS_CONTEXT() in the fine Oracle® Database SQL Reference.
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

Posting Permissions

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