Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7438015
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:29:21+00:00 2026-05-29T10:29:21+00:00

How do I edit BLOBs (containing JSON text) in Oracle SQL Developer? I can

  • 0

How do I edit BLOBs (containing JSON text) in Oracle SQL Developer?

I can open and view them, but do I need an external editor to edit them? Any help on what to use, even if just notepad, and how to go about it would be greatly appreciated in the answer.

EDIT: BLOBs in question contain JSON text.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T10:29:22+00:00Added an answer on May 29, 2026 at 10:29 am

    If you run a query in SQL Developer 3.1 (and probably earlier releases) that returns a BLOB, you can double-click on the particular BLOB you’re interested in where you’ll be prompted either to try to send the data to an external editor or to try to have the built-in SQL Developer display control attempt to interpret the data as an image or as text. Your JSON data will probably display correctly if you choose the text option.

    If you want to change the data, however, you’re going to have to issue an UPDATE to actually set the data. SQL Developer doesn’t have the functionality to directly edit the LOB data. For example

    UPDATE table_name
       SET column_with_json_data = 
              utl_i18n.string_to_raw( '{"foo": {"id": "1", "value": "2"}}' )
     WHERE primary_key = <<some value>>
    

    will update the specified row with the new JSON data encoded using the database character set. If you want to store the data in some other character set, string_to_raw takes an optional second parameter that specifies the character set. So if you want to store the data using the UTF-8 character set, you’d do something like this

    UPDATE table_name
       SET column_with_json_data = 
              utl_i18n.string_to_raw( '{"foo": {"id": "1", "value": "2"}}', 'AL32UTF8' )
     WHERE primary_key = <<some value>>
    

    Of course, since JSON data is textual, you’d be far better off storing the data in a CLOB which is designed to store character large objects. Then SQL Developer (and other tools) could just display the text rather than requiring you to select the result and then take additional actions to convert it to text. And you wouldn’t have to convert the data to RAW in order to update the data in the database.

    If the data is too long for string_to_raw to handle (which depends on the character set and the data but will occur any time the RAW data exceeds 2000 bytes), you can store the data in a CLOB and then convert that into a BLOB that you use to update the table. That’s a bit more complex but it is more flexible. In this example, I’m padding the JSON data out to 3200 characters with a ‘*’– obviously the test data is no longer valid JSON but that’s not important for purposes of this question.

    declare
      l_blob        blob;
      l_clob        clob := rpad('{"foo": {"id": "1", "value": "2", "name": "bob"}}',3200,'*');
      l_amt         integer := dbms_lob.lobmaxsize;
      l_dest_offset integer := 1;
      l_src_offset  integer := 1;
      l_csid        integer := dbms_lob.default_csid;
      l_ctx         integer := dbms_lob.default_lang_ctx;
      l_warn        integer;
    begin
      dbms_lob.createTemporary( l_blob, false );
      dbms_lob.convertToBlob( l_blob,
                              l_clob,
                              l_amt,
                              l_dest_offset,
                              l_src_offset,
                              l_csid,
                              l_ctx,
                              l_warn );
    
      -- You'll want to add a WHERE clause as well
      update json_data
         set data = l_blob;
    
      dbms_lob.freeTemporary( l_blob );
    end;
    /
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

EDIT What small things which are too easy to overlook do I need to
EDIT 1: Can someone please help me create a very very simplistic sample page
How to edit a Word Document (.docx) stored in a SQL Server Table? Here
And have a big blob of values, with a space in between? Edit: What
Edit: This question was written in 2008, which was like 3 internet ages ago.
Edit: From another question I provided an answer that has links to a lot
EDIT: This was formerly more explicitly titled: - Best solution to stop Kontiki's KHOST.EXE
EDIT: Learned that Webmethods actually uses NLST, not LIST, if that matters Our business
EDIT: This question is more about language engineering than C++ itself. I used C++
Edit : Solved, there was a trigger with a loop on the table (read

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.