+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13

TOAD: SQL Script execution

  1. Re: TOAD: SQL Script execution


    rik wrote:
    > Hi, I'm trying to execute a simple SQL script in TOAD
    >
    > INSERT INTO TABLE (fields...)
    > SELECT fields FROM TABLE
    >
    > But I obtain an error on second table:
    >
    > Table or view not found!
    >
    > Why this??
    >
    > I'm logged in TOAD with the users of TableSpace, and then I try to execute a
    > query on a table of this TableSpace
    >
    > Thanks


    Hi Rik,

    Please clarify what you mean by "I'm logged in TOAD with the users of
    TableSpace, and then I try to execute a query on a table of this
    TableSpace". My assumption is you mean the user has been granted
    INSERT access on the table, but doesn't own it? In this case, the user
    would either need a synonym, or need to provide completely qualified
    names (with owner) to the statement trying to run. I thought TOAD did
    this under the hood, but maybe it only does it when you click on a
    table in the GUI.

    To test, change your INSERT to...

    INSERT INTO ownername.TABLE (fields...)
    SELECT fields FROM ownername.TABLE

    ....and see what you get

    Regards,

    Steve


  2. Re: TOAD: SQL Script execution


    rik wrote:
    > Hi, I'm trying to execute a simple SQL script in TOAD
    >
    > INSERT INTO TABLE (fields...)
    > SELECT fields FROM TABLE
    >
    > But I obtain an error on second table:
    >
    > Table or view not found!
    >
    > Why this??
    >
    > I'm logged in TOAD with the users of TableSpace, and then I try to execute a
    > query on a table of this TableSpace
    >
    > Thanks


    Hi Rik,

    Please clarify what you mean by "I'm logged in TOAD with the users of
    TableSpace, and then I try to execute a query on a table of this
    TableSpace". My assumption is you mean the user has been granted
    INSERT access on the table, but doesn't own it? In this case, the user
    would either need a synonym, or need to provide completely qualified
    names (with owner) to the statement trying to run. I thought TOAD did
    this under the hood, but maybe it only does it when you click on a
    table in the GUI.

    To test, change your INSERT to...

    INSERT INTO ownername.TABLE (fields...)
    SELECT fields FROM ownername.TABLE

    ....and see what you get

    Regards,

    Steve


  3. TOAD: SQL Script execution

    Hi, I'm trying to execute a simple SQL script in TOAD

    INSERT INTO TABLE (fields...)
    SELECT fields FROM TABLE

    But I obtain an error on second table:

    Table or view not found!

    Why this??

    I'm logged in TOAD with the users of TableSpace, and then I try to execute a
    query on a table of this TableSpace

    Thanks

  4. Re: TOAD: SQL Script execution


    rik wrote:
    > Hi, I'm trying to execute a simple SQL script in TOAD
    >
    > INSERT INTO TABLE (fields...)
    > SELECT fields FROM TABLE
    >
    > But I obtain an error on second table:
    >
    > Table or view not found!
    >
    > Why this??
    >
    > I'm logged in TOAD with the users of TableSpace, and then I try to execute a
    > query on a table of this TableSpace
    >
    > Thanks


    Hi Rik,

    Please clarify what you mean by "I'm logged in TOAD with the users of
    TableSpace, and then I try to execute a query on a table of this
    TableSpace". My assumption is you mean the user has been granted
    INSERT access on the table, but doesn't own it? In this case, the user
    would either need a synonym, or need to provide completely qualified
    names (with owner) to the statement trying to run. I thought TOAD did
    this under the hood, but maybe it only does it when you click on a
    table in the GUI.

    To test, change your INSERT to...

    INSERT INTO ownername.TABLE (fields...)
    SELECT fields FROM ownername.TABLE

    ....and see what you get

    Regards,

    Steve


  5. Re: TOAD: SQL Script execution

    Yes!!

    If I modify the query with user.table it works OK!!!

    How Can modify it for use the query with the tablename without "user."

    Thanks

  6. Re: TOAD: SQL Script execution

    Yes!!

    If I modify the query with user.table it works OK!!!

    How Can modify it for use the query with the tablename without "user."

    Thanks

  7. Re: TOAD: SQL Script execution


    "null" wrote in message
    news:4489cb12$0$36935$4fafbaef@reader3.news.tin.it...
    > Yes!!
    >
    > If I modify the query with user.table it works OK!!!
    >
    > How Can modify it for use the query with the tablename without "user."
    >
    > Thanks



    You could execute the query with the table owner (user), or create a synonym
    for the other user.

    create synonym other_user.table for user.table

    and grant the necessary rights to the other user.


    Matthias



  8. Re: TOAD: SQL Script execution


    "null" wrote in message
    news:4489cb12$0$36935$4fafbaef@reader3.news.tin.it...
    > Yes!!
    >
    > If I modify the query with user.table it works OK!!!
    >
    > How Can modify it for use the query with the tablename without "user."
    >
    > Thanks



    You could execute the query with the table owner (user), or create a synonym
    for the other user.

    create synonym other_user.table for user.table

    and grant the necessary rights to the other user.


    Matthias



  9. Re: TOAD: SQL Script execution

    On Fri, 9 Jun 2006 19:24:48 GMT, "null" wrote:

    >Yes!!
    >
    >If I modify the query with user.table it works OK!!!
    >
    >How Can modify it for use the query with the tablename without "user."
    >
    >Thanks


    Look up 'synonyms' in the documentation.

    --
    Sybrand Bakker, Senior Oracle DBA

  10. Re: TOAD: SQL Script execution

    On Fri, 9 Jun 2006 19:24:48 GMT, "null" wrote:

    >Yes!!
    >
    >If I modify the query with user.table it works OK!!!
    >
    >How Can modify it for use the query with the tablename without "user."
    >
    >Thanks


    Look up 'synonyms' in the documentation.

    --
    Sybrand Bakker, Senior Oracle DBA

+ Reply to Thread
Page 1 of 2 1 2 LastLast