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?


    Requires Free Membership to View

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

Join the conversationComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.