dbi db2 select

Discussion in 'Perl' started by Carmine, Aug 25, 2003.

  1. Carmine

    Carmine Guest

    Is there anyway to execute this select statement with dbi?

    select
    'grant select on ' concat substr(viewschema,1,7) concat '.' concat
    substr(viewname,1,18) concat
    ' to ' concat dbc_xid_user_id concat ';'
    from syscat.views, ls2user.vls_db_connection
    where viewschema = 'ls2user'
    and valid='Y'
    and seqno = 1
    union
    select
    'grant select on ' concat substr(viewschema,1,7) concat '.' concat
    substr(viewname,1,18) concat
    ' to ls2user;'
    from syscat.views
    where viewschema = 'ls2user'
    and valid='Y'
    and seqno = 1
    order by 1;

    I can run it successfully from a db2 command window like this:
    db2 -atvf gengrant.sql -z grant.sql

    but can't find any docs on how to do this with dbi...
    Any help would be appreciated.
    Thanks.
     
    Carmine, Aug 25, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kate Perry

    connect to db2 database using dbi?

    Kate Perry, Jul 10, 2003, in forum: Perl
    Replies:
    0
    Views:
    3,234
    Kate Perry
    Jul 10, 2003
  2. Replies:
    0
    Views:
    7,608
  3. Dinesh
    Replies:
    0
    Views:
    160
    Dinesh
    Apr 3, 2006
  4. Replies:
    0
    Views:
    184
  5. Nicholas Quaine

    DBI:ibm_db connection for IBM DB2 database

    Nicholas Quaine, Apr 25, 2008, in forum: Ruby
    Replies:
    2
    Views:
    157
    Gerardo Santana Gómez Garrido
    Apr 29, 2008
Loading...

Share This Page