| 
		
			| chagne case [message #62798] | Mon, 16 August 2004 00:09  |  
			| 
				
				
					| Anu Messages: 82
 Registered: May 2000
 | Member |  |  |  
	| Hi all! 
 I have imported around 1224 tables/views to a oracle schema from SQL server. Unfortunately all the tables/views are downloaded in lower case(i.e., when i used the command
 
 "Select * from tab",  the rows retrieved are all in lower case).  and also all the views are converted to tables and i cant find any view in the schema.
 
 Could any body please let me know how to change the case(in bulk) and tabtype(table to view).
 
 
 
 thanks in advance
 
 Anu
 |  
	|  |  | 
	| 
		
			| Re: chagne case [message #62804 is a reply to message #62798] | Mon, 16 August 2004 04:32  |  
			| 
				
				|  | Mahesh Rajendran Messages: 10708
 Registered: March 2002
 Location: oracleDocoVille
 | Senior MemberAccount Moderator
 |  |  |  
	| --
-- depends on your version
-- in 9i u can just rename the table as following.
--  run the script, spool the output,run the spooled file and you are all set.
dbadmin@republic_lawd1 > create table "lowercase" ( id number);
Table created.
dbadmin@republic_lawd1 > create view "myview" as select * from emp;
View created.
dbadmin@republic_lawd1 > select * from cat;
TABLE_NAME                     TABLE_TYPE
------------------------------ -----------
lowercase                      TABLE
myview                         VIEW
2 rows selected.
dbadmin@republic_lawd1 > spool dummy
  1* select 'rename "'||table_name||'" to '||upper(table_name) from cat
dbadmin@republic_lawd1 > /
'RENAME"'||TABLE_NAME||'"TO'||UPPER(TABLE_NAME)
-------------------------------------------------------------------------
rename "lowercase" to LOWERCASE
rename "myview" to MYVIEW
 |  
	|  |  |