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

Thread: build sql with sql

  1. #1
    Join Date
    Oct 2000
    Posts
    139
    hi

    i need to create a role with dml privilege on a user´s tables

    i used this


    select 'grant select, insert, delete, update on ' privilege, owner,'.', table_name
    from dba_tables where owner='ICDBA'
    order by 3;

    and I get


    PRIVILEGE OWNER ' TABLE_NAME
    ---------------------------------------- ----- - ------------------------------

    grant select, insert, delete, update on IC . EVT_CARRIER_CONFIGURATION
    grant select, insert, delete, update on IC . EVT_DEST_PROFILE
    grant select, insert, delete, update on IC . EVT_HISTORY



    is there anyway to achieve

    grant select, insert, delete, update on IC.EVT_HISTORY

    getting rid of spaces between lines?

  2. #2
    Join Date
    Oct 2000
    Posts
    90
    Try

    select 'grant select, insert, delete, update on ' || owner || '.' || table_name
    from dba_tables

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