DBAsupport.com Forums - Powered by vBulletin
Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: need help??

  1. #11
    Join Date
    May 2002
    Posts
    42
    I don't think you need the & in the line below.
    v_test NUMBER := &loopcount;

  2. #12
    Join Date
    Aug 2001
    Posts
    75
    The will work. I have tested it


    $cat myscript.sql

    SET SERVEROUTPUT on
    DEFINE loopcount = &1

    DECLARE
    v_test NUMBER := &loopcount;
    BEGIN
    DBMS_OUTPUT.PUT_LINE(v_test);
    END;




    Sanjay
    Originally posted by alenz
    Originally posted by Trina
    Hi Alenz,
    I want to thank you for your help. I tried your method and I'm not sure if I did it
    correctly. It didn't work. My sql scripts are below. It didn't recognize the $.

    ksh script:
    i=1
    sqlplus -s @myscript.sql $i

    sql script:
    SET SERVEROUTPUT on
    DEFINE loopcount = $i

    DECLARE
    v_test NUMBER := &loopcount;
    BEGIN
    DBMS_OUTPUT.PUT_LINE(v_test);
    END;
    /

    change
    DEFINE loopcount = $i
    to
    DEFINE loopcount = &1

    does this work?
    OCP 8i

Posting Permissions

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


Click Here to Expand Forum to Full Width