DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3


  1. #1
    Join Date
    Apr 2001
    On wich way I can pass name of schema to SQL scripts.
    For example in script I have
    SELECT * from 'NAME_OF_SCHEMA'.name_of_table;

  2. #2
    Join Date
    Mar 2001
    Im sorry, I don't fully understand your question.
    Can you clarify?

    Are you trying to find out how to use dynamic sql?

    If you are not looking to use dynamic sql, you are correct-- you probably know you don't need the quotes around the schema name.

    Let me know your question was looking for how to use dynamic sql, and then I will answer that. (Just dont want to do all that typing if that's not what you want) If you want dynamic sql--- do you have 8i? If not, you will need to use the DBMS_SQL package. It's pretty straightforward, and so I think the documentation would contain everything you need , such as what procedures for what type of statement.


  3. #3
    Join Date
    Apr 2001
    OK, It seems that I was not clear enough.
    My problem is next.
    I need to write PL/SQL scripts that will be called from .bat file and I need to pass name of user(schema) to script.
    For example:
    This will be in test.bat file:
    sqlplus scott/tiger @test.sql username_1
    and now in test.sql I need to create variable that will take value username_1,
    I tought I need to write somethink like this in test.sql:

    CCLINT CONSTANT and here type of variable :='&1';
    I have tried with VARCHAR2 but it didn't work,
    Any idea how to solve this problem?


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

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.