The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
bourne shell - lower case a string buechler66 UNIX for Dummies Questions & Answers 5 05-08-2008 10:00 AM
Sed - Lower case single characters zlindner UNIX for Dummies Questions & Answers 6 12-09-2007 07:07 AM
Accepting Upper and Lower case lweegp Shell Programming and Scripting 8 12-08-2007 02:57 PM
lower case to upper case string conversion in shell script dchalavadi UNIX for Dummies Questions & Answers 3 05-28-2002 09:07 PM
Upper And Lower Case pciatto Shell Programming and Scripting 1 04-29-2002 09:17 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-17-2008
Registered User
 

Join Date: Mar 2008
Posts: 1
Script needed to select and delete lower case and mixed case records

HELLO ALL,

URGENTLY NEEDED A SCRIPT TO SELECT AND DELETE LOWER AND MIXED CASE RECORDS FROM A COLUMN IN A TABLE.

FOR EXAMPLE : Table name is EMPLOYEE and the column name is CITY
and the CITY column records will be: Newyork
washington
dallas
New jersey
Texas.... and so on.... many records will be there in this CITY column,

Both the lower case and also the record which starts with UPPER CASE like 'NewYork '
should retrieve and delete from the one column in one particular table.

Thanks in anticipation!!!
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 03-17-2008
Registered User
 

Join Date: Mar 2008
Posts: 5
Hi Abhilash,

you should use the following query in ur script to delete the records other than upper case

select * from employee where city not in ucase(city)
delete from employee where city not in ucase(city)

***************script wiill be like this************

$SQLPLUS username/password@schemaname @query.sh>temp.log

where query.sh contains the following query

delete from employee where city not in ucase(city)

***********************************************
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:01 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0