Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to compress text data before storing it in database

 
Anand Achyut
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all
I am writing an application which needs to store lots of text data in database. Is there a way of compressing text data before i store it in Database. I use Oracle 8 database and Weblogic server for my application.
Please help!!!
Thanks in Advance
Anand
 
Phil Berggren
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This isn't really compressing the text field, but it will get rid of leading and trailing spaces:
In your SQL statement to insert into your table add trim(FieldName) to each text field. For example if you have a text field called FirstName, it would be trim(FirstName), trim(LastName)......
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!