How do I execute an sql query using a vbscript inputbox?
Posted on 2008-09-30
How would I go about creating a vbscript that asks the user for a username, then when entered, it runs the following sql query:
select username, granted_role
from all_users a,
where a.username = b.grantee
and ( b.granted_role like 'WV%'
or b.granted_role like 'SV%')
and a.username = UPPER('&1');
The query is searching to see if a user has a specific Oracle role, so if the user does have a role (beginning with WV, or SV), a dialogue will popup and say "user has the following roles" and then list the associated roles.
I have NO idea how to do this, but it is something that I'd really like. I imagine there would need to be a connection string involved, which is WV_PROD with a schema owner of PROD1 and password pf PROD1.
I hope what I'm asking for makes sense. Thanks in advance to those who can help!!