PL/SQL (MOSC)

MOSC Banner

User as variable

edited May 6, 2010 6:45AM in PL/SQL (MOSC) 12 commentsAnswered ✓
 Hello all,
Here is what I want to accomplish.

i have a statement that looks like this.

select count(*) into nolines from testdta.table;

I don't want to hardcode the user testdta, instead i want to use a variable. 

varuser := testdta
select count(*) into nolines from varuser.table;

How can I do this, what type should my variable be? Hope i was explicit enough.

Thanx,
Dan.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center