Home » SQL & PL/SQL » SQL & PL/SQL » && variable, how to get it in CAP ?
&& variable, how to get it in CAP ? [message #8673] Thu, 18 September 2003 03:59 Go to next message
Gerald
Messages: 54
Registered: January 2001
Member
Dears,

May be an easy one ?
I need a variable like &&mytable in a script
but i need it in CAPS, because it's a name of a TABLE.
And I do some "Select...where table_name='&&mytable';"
I can't do an upper at this point ? no ?
Re: && variable, how to get it in CAP ? [message #8679 is a reply to message #8673] Thu, 18 September 2003 06:34 Go to previous message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
mag@mutation_mutation > select count(*) from &table_name;
Enter value for table_name: emp
old   1: select count(*) from &table_name
new   1: select count(*) from emp

  COUNT(*)
----------
        14

mag@mutation_mutation > /
Enter value for table_name: dept
old   1: select count(*) from &table_name
new   1: select count(*) from dept

  COUNT(*)
----------
         4
mag@mutation_mutation > select count(*) from user_tab_cols where table_name=UPPER('&table_name');
Enter value for table_name: emp
old   1: select count(*) from user_tab_cols where table_name=UPPER('&table_name')
new   1: select count(*) from user_tab_cols where table_name=UPPER('emp')

  COUNT(*)
----------
         8

mag@mutation_mutation > /
Enter value for table_name: dept
old   1: select count(*) from user_tab_cols where table_name=UPPER('&table_name')
new   1: select count(*) from user_tab_cols where table_name=UPPER('dept')

  COUNT(*)
----------
         3

Previous Topic: want to retrieve specific Records - say between 4th to 7th
Next Topic: reset high water mark
Goto Forum:
  


Current Time: Wed Apr 24 02:54:22 CDT 2024