Results 1 to 2 of 2

Thread: sql help

  1. #1
    Join Date
    Jan 2008

    Unanswered: sql help

    Hi All, I am trying to find if any table that belong to SCHEMA SUNNY and doesnt not have update and insert grants for testuser using sql..

    select tabname from syscat.tables where tabschema = 'SUNNY' and type = 'T'

    select tabname from syscat.tabauth where grantee = 'TESTUSER' AND INSERTAUTH = 'N' AND UPDATEAUTH = 'N'

    how can I join these two ???

    thanks in advance..


  2. #2
    Join Date
    Jun 2006
    you have tabname and tabschema in both tables so
    from syscat.tables a , syscat.tabauth b
    where a.tabname=b.tabname and a.tabschema=b.tabschema.....
    Best Regards, Guy Przytula
    DB2 UDB LUW certified V6/7/8

Posting Permissions

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