File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes SQL Script to delete the records based on length Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "SQL Script to delete the records based on length" Watch "SQL Script to delete the records based on length" New topic
Author

SQL Script to delete the records based on length

sudha swami
Ranch Hand

Joined: Apr 24, 2007
Posts: 177
Hi,

I am looking for the SQL Script to delete the name whose length is less than 4 characters.

regards
sudha
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2343

mysql example (be carefull when testing!)
Regards, Jan


OCUP UML fundamental
ITIL foundation
sudha swami
Ranch Hand

Joined: Apr 24, 2007
Posts: 177
Hi,
I am using database as Oracle.
regards
sudha
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 26182
    
  66

Sudha,
That SQL will work in Oracle too.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Paul Campbell
Ranch Hand

Joined: Oct 06, 2007
Posts: 338
Sudha,

Do you want to update the name to be null (remove it) where it is less than 4 or do you want to delete the row where the name is less than 4?
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2343

I derived from the post's title that it was a request to delete them.
Regards, Jan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SQL Script to delete the records based on length
 
Similar Threads
SchemaExportTask query
Identifier too long exception in SQL server 7
delete sql not working
How do I make a sevlet be called once a day?
sql inserting large String