Q

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 first published in June 2001

Dig deeper on Oracle database design and architecture

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

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.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close