C
Carmine
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.
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.