Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > dbi db2 select

Reply
Thread Tools

dbi db2 select

 
 
Carmine
Guest
Posts: n/a
 
      08-25-2003
Is there anyway to execute this select statement with dbi?

select
'grant select on ' concat substr(viewschema,1,7) concat '.' concat
substr(viewname,1,1 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,1 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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DBI:ibm_db connection for IBM DB2 database Nicholas Quaine Ruby 2 04-29-2008 04:02 PM
DB2 under Windows XP - "Missing DB2 Libraries or headers" daf@jaade.com Ruby 0 04-26-2006 03:08 PM
Installing ruby-db2-0.4 for DB2 gives SQLConnect() errors. Dinesh Ruby 0 04-03-2006 04:20 AM
Hibernate 3.1 and db2 connecting using com.ibm.db2.jcc.DB2Driver crawstevenford@gmail.com Java 0 02-19-2006 08:20 PM
connect to db2 database using dbi? Kate Perry Perl 0 07-10-2003 06:44 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57