Home » SQL & PL/SQL » SQL & PL/SQL » Update blob Column (Oracle 11g)
Update blob Column [message #644346] Tue, 03 November 2015 11:27 Go to next message
P1Oracle
Messages: 60
Registered: August 2014
Location: Hyderabad
Member
Hi all,
I need to update blob column of my table..
please can anybody share query for me.i need to update a column of blob type(column contains .xls file)
Thanks..

[Updated on: Tue, 03 November 2015 11:29]

Report message to a moderator

Re: Update blob Column [message #644347 is a reply to message #644346] Tue, 03 November 2015 11:28 Go to previous messageGo to next message
Michel Cadot
Messages: 68648
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

How did you insert it?

Re: Update blob Column [message #644348 is a reply to message #644347] Tue, 03 November 2015 11:31 Go to previous messageGo to next message
P1Oracle
Messages: 60
Registered: August 2014
Location: Hyderabad
Member
i am trying like regular insert.
Re: Update blob Column [message #644350 is a reply to message #644348] Tue, 03 November 2015 11:50 Go to previous messageGo to next message
Michel Cadot
Messages: 68648
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

How?
Which programming language?
Which tool?

[Updated on: Tue, 03 November 2015 11:51]

Report message to a moderator

Re: Update blob Column [message #644351 is a reply to message #644350] Tue, 03 November 2015 11:59 Go to previous messageGo to next message
P1Oracle
Messages: 60
Registered: August 2014
Location: Hyderabad
Member
Hmmm..Thanq Michel for reply
here you go..
This is the table structure i have
CREATE TABLE XXXX
(
  DATA_ELEMENT_ID    NUMBER,
  SUITE_ID           NUMBER,
  MODULE_ID          NUMBER,
  DATA_ELEMENT       VARCHAR2(50 BYTE)          NOT NULL,
  DESCRIPTION        VARCHAR2(50 BYTE),
  NOTES              VARCHAR2(250 BYTE),
  SCRIPT             CLOB,
  SCRIPT_SEQ         NUMBER,
  [b]TEMPLATE           BLOB,[/b]
  ENABLED_FLAG       NUMBER                     NOT NULL,
  DELETED_FLAG       NUMBER                     NOT NULL,
  CREATED_BY         NUMBER                     NOT NULL,
  CREATION_DATE      DATE                       NOT NULL,
  LAST_UPDATED_BY    NUMBER                     NOT NULL,
  LAST_UPDATED_DATE  DATE                       NOT NULL
)


for the above column template i need to update with another .xls file..
Thanq
Re: Update blob Column [message #644352 is a reply to message #644351] Tue, 03 November 2015 12:03 Go to previous messageGo to next message
P1Oracle
Messages: 60
Registered: August 2014
Location: Hyderabad
Member
Here i am using Oracle 11g and Toad Tool.
Re: Update blob Column [message #644354 is a reply to message #644352] Tue, 03 November 2015 12:09 Go to previous messageGo to next message
Michel Cadot
Messages: 68648
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

You want to update BLOB from TOAD?
How do you pass a BLOB to TOAD?

Re: Update blob Column [message #644355 is a reply to message #644354] Tue, 03 November 2015 12:14 Go to previous messageGo to next message
P1Oracle
Messages: 60
Registered: August 2014
Location: Hyderabad
Member
Really , i don't know how they are inserted .xls file into template column..
but i need to update with another .xls file(updated one) can you please help me on this..
Re: Update blob Column [message #644357 is a reply to message #644355] Tue, 03 November 2015 12:22 Go to previous messageGo to next message
Michel Cadot
Messages: 68648
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

If you want accurate help you must give a detailed and exact specification of what you want.
If I give a solution in one language and you reply this is not what you want because you use another language then I just wasted my time.
So where does the BLOB come from? Where is it when you want to insert or update (not clear in your question now)? Is it a one-shot task or an everyday one?
...

Re: Update blob Column [message #644361 is a reply to message #644357] Tue, 03 November 2015 12:43 Go to previous messageGo to next message
P1Oracle
Messages: 60
Registered: August 2014
Location: Hyderabad
Member
It is one-shot task.
Thanq michel anyhow i am getting replaced with new file.i did it through toad and table got updated
Re: Update blob Column [message #644362 is a reply to message #644361] Tue, 03 November 2015 12:47 Go to previous messageGo to next message
Michel Cadot
Messages: 68648
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Database SecureFiles and Large Objects Developer's Guide
Chapter 2 Working with LOBs

Re: Update blob Column [message #644363 is a reply to message #644361] Tue, 03 November 2015 12:51 Go to previous messageGo to next message
P1Oracle
Messages: 60
Registered: August 2014
Location: Hyderabad
Member
I did it like this:
Open table in Toad(press f4)
click on data of blob column type(here my blob column is template), a popup window appears(blob edit) in that do modifications..

Correct me if i did anything wrong..
Re: Update blob Column [message #644364 is a reply to message #644363] Tue, 03 November 2015 13:12 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
how to know which row gets changed to which new BLOB?
Re: Update blob Column [message #644385 is a reply to message #644361] Wed, 04 November 2015 04:40 Go to previous message
Michel Cadot
Messages: 68648
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

And here's an example of a procedure to do it in PL/SQL.

Previous Topic: Nested table as a out parameter in procedure
Next Topic: Materialized View Refresh Issue
Goto Forum:
  


Current Time: Thu May 09 08:23:07 CDT 2024