Problem solve Get help with specific problems with your technologies, process and projects.

Is it possible to incorporate a compress/uncompress utility into a SQL query?

Is it possible to incorporate a compress/uncompress utility into a SQL query? I want to select a CLOB, compress...

it and then write it to a table with a BLOB, all in SQL. Is it possible to include GZIP (Solaris UNIX) into a SQL select and update statement?

It is not possible to include non-SQL functions in a SQL query. The closest thing you can do is to code an external procedure which calls your external routine. But you can't call the procedure from SQL. You can however call the procedure from a PL/SQL block. For more information on external procedures, please refer to the Oracle documentation.

You can still perform what you want to accomplish as long as you do not try to constrain yourself to a SQL query. Have you tried using OCI or Perl to extract the CLOB, compress it, and store it as a BLOB?

For More Information

This was last published in June 2001

Dig Deeper on Oracle database design and architecture

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.