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 Trim Function Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "SQL Trim Function" Watch "SQL Trim Function" New topic
Author

SQL Trim Function

Abu Nene
Ranch Hand

Joined: Nov 13, 2008
Posts: 56
Hi it is a good practise to apply the SQL trim function on all the VARCHAR2 column used in the where clause? For eg.



Please advise, thanks.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41068
    
  43
That depends on whether any whitespace might be significant for the application's purposes or not.


Ping & DNS - my free Android networking tools app
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2491
    
    8

On several databases, this has a performance impact if the field is indexed. Yorur database might stop using the index if you wrap a function around your field.


OCUP UML fundamental and ITIL foundation
youtube channel
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SQL Trim Function
 
Similar Threads
Login JSP page using mysql(DB)
Is there any trim function in xsl ?
using Strings to query database??
Using Trim function in Hibernate
q from abhilash mock exam on strings.