SQL & PL/SQL :: Update Blob Column With Images From A Directory

Jan 17, 2012

i have to update the blob column in a table with new image.

we have a table with 10 columns in which one column is 'image' as BLOB data type, and one more column with "image_name " and has more than 1000 rows.

I have a 300 images which I need to update in "image" column .

I need to match the given images name with "image_name" column, if row is present in the table than update the "image" column with the given image.

I search and found almost same code to insert the image in new table with a procedure, I mean code is to call the procedure, ( by passing image name and image directory)

Is there any way that we will check all the image given in the directory, if that image_name is present in the table then update the image provide me a sample code for this

View 2 Replies


ADVERTISEMENT

Data Guard :: Move BLOB Images In DB To BFILE To Reduce Time And Size Of Backup?

Jan 22, 2012

We are planning to move BLOB images in our DB to BFILE to reduce the time and size of backup.

So when we have a physical dataguard setup, can we configure data guard to copy the OS level BFILE's to the DR site?

View 2 Replies View Related

SQL & PL/SQL :: Read Blob Data From Database Into Directory?

Feb 12, 2010

I can store my video in to my database.but i cannot read such file.....using this procedure

ORA-29285: file write error

CREATE OR REPLACE PROCEDURE Extract_bfile
(p_id IN NUMBER)
IS
vblob BFILE;
vstart NUMBER := 1;
bytelen NUMBER := 32000;
len NUMBER;

[code]....

View 4 Replies View Related

SQL & PL/SQL :: How To Store Images In Table Column

Dec 21, 2011

How to store images in table column. I have table called emp with datatype empno,name,photo_id(long raw)
.
i want to store image in table for each record.

View 3 Replies View Related

How To Insert A BLOB Column

Nov 9, 2008

how to insert into a BLOB column. I have stored procedure with an input parameter of type BLOB now how do I insert this BLOB into a table.

View 2 Replies View Related

SQL & PL/SQL :: Insert Into BLOB Column

Jul 21, 2011

I have a table with a column of type blob. Now i want to create a procedure which will insert into that table. But I don't like to create a directory. How can i solve this.

I want to insert a row like this:

insert into table x(image)
values('d:photo est.jpg');

View 2 Replies View Related

PL/SQL :: Delete Blob Column

Jun 7, 2013

I have these tables:

Products

CREATE TABLE "COMPDB"."PRODUCTS"
   (     "PRO_ID" NUMBER NOT NULL ENABLE,
     "PRO_NAME" VARCHAR2(40 BYTE) NOT NULL ENABLE,
     "COMPETITOR" NUMBER NOT NULL ENABLE,
     "CATEGORY" NUMBER NOT NULL ENABLE,

[Code]..

Now my problem:

In want to delete the blob column(The Content) in Products and the columns, which belong to this column(Filename,Mimetype,Last_update_date).
EMPTY_BLOB() doesn't work

View 4 Replies View Related

PL/SQL :: Get Particular Value From Column Which Is BLOB Datatype?

Jul 31, 2013

on this query. I need to get a particular value from a column which is a BLOB datatype. Here is the sample

data ID                           TESTDATA1                            Best Buy
00001234 12222 30 00 2                           
Lowes 00001234 12222 100 00 3                           
Walmart 00001234 12222 129 00 4                           
abc 00001234 12222 5000 00 5                           
Toshiba 00001234 12222 21 00 6                           
abcdefghij 00001234 12222 49 00  

Where '00001234' is the Invoice , '12222' is Netamount field and highlighted in red is the $ amount for that invoice.

The only data i need query to return 12222 (netamount)= $amount. I tried using substr  select substr((TESTDATA),19,26)test from TABLEA; But this gives me the only the first row but not other amount which have different positions.

Here is the desired output

OutputID                            TESTDATA 1                          
12222 30 2                            12222 100 3                           
12222 129 4                            12222 5000 5                           
12222 21 6                            12222 49 

View 11 Replies View Related

SQL & PL/SQL :: Unzipping The File In BLOB Column?

Apr 9, 2012

I am trying to extract the BLOB column in Oracle Apex and show the contents of it as a popup message.

The files which are stored in the blob column are being zipped using windows zip function in Perl and being inserted in the dataabse using some perl program as follows,

my $zip = Archive::Zip->new();
my $zipfile = $zip->addFile( @$_->[1] ,basename(@$_->[0]));

While extracting the blob column we are using the utl_compress.lz_uncompress_extract() to extract the uncompressed version of file, but we are getting the following error as

"ORA-29294: A data error occurred during compression or uncompression".

I even tried the solution as mentioned in oracle forum

View 6 Replies View Related

Forms :: Updating BLOB Column

Mar 11, 2012

I am using Forms 6i,From my Form, user selects "sno" and upload BLOB image through OAF Upload utility. It stores the rowid of "SNO" and image...into Table "t1"...Now, i want to update the BLOB image into the original table"t2" using rowid..For this , i wrote the rowlevel trigger on Table "t1", in the trigger, i called a Procedure...In that procedure .. i am trying to update the BLOB column..It is not updating the BLOB column..But it is updating the Other values.. except BLOB column.

View 1 Replies View Related

SQL & PL/SQL :: Insert PDF File Into BLOB Column?

Jan 20, 2011

I want to store a pdf file into a database column of BLOB type. The pdf file on the client system not on the database server. Is there any way i can achieve this?

View 1 Replies View Related

SQL & PL/SQL :: BLOB Datatype - Copy From One Column To Another

Mar 11, 2011

I have two tables with BLOB datatype. I am trying to copy from one column to another column , i am getting errors

CREATE OR REPLACE PROCEDURE update_blob_lob_copy(
v_id in integer,
v_string in varchar
)
as
auditlob lobdemoaudit.theblob%type;
sourcelob lobdemo.THEBLOB%type;
[code]...

View 3 Replies View Related

SQL & PL/SQL :: Retrieve Data From Blob Column?

Sep 30, 2011

example for retrieve data from blob column using pl sql procedure in oracle?

View 2 Replies View Related

Calculate Size Of Table With BLOB Column

Feb 5, 2007

when trying to calculate the occupied space for a table, I'm using DBA_SEGMENTS, which works fine as long as the table does not have a BLOB column.

As far as I can tell, the size of the BLOB data is stored with the SEGMENT_TYPE = 'LOBSEGMENT', but I cannot find a view that tells me which DBA_SEGMENT row belongs to the BLOB column in the table I'm checking.

To give you an example:

select sum(BYTES)
from DBA_SEGMENTS
where owner = user
and segment_name = 'MY_TABLE'
group by SEGMENT_NAME

returns 262144

running:

SELECT sum(length(blob_column))
FROM my_table

returns 821333

There are entries in DBA_SEGMENTS for my user with the type LOBSEGMENT, but I cannot find a way to map the correct DBA_SEGMENTS row to the table I am checking.

I'm using Oracle 10.2.0.3.0 on Redhat

View 2 Replies View Related

SQL & PL/SQL :: Create One BLOB Column Including One PDF File?

Dec 24, 2010

I use Database 11g .

I have 2 BLOB columns include pdf files.

How can I create one BLOB column include one one pdf file? merge 2 pdf files into one file.

View 4 Replies View Related

SQL & PL/SQL :: Insert Image Files Into Blob Column?

Mar 3, 2011

I am trying to insert an image files into a blob column using the following code.

CREATE TABLE MY_IMAGE_TABLE (
ID NUMBER,
NAME VARCHAR2(20),
IMAGE BLOB);
CREATE OR REPLACE DIRECTORY MY_FILES AS '\dppdb-dev est';
GRANT ALL ON DIRECTORY MY_FILES TO PUBLIC;

[code]....

However, I am getting the this error

ORA-22288: file or LOB operation FILEOPEN failed

I've done some tracing on toad and it seems that the file am trying to insert exists yet am unable to open it.

View 4 Replies View Related

PL/SQL :: How To Store PDF In BLOB Column Then Select / Search It Using SQL

Jul 19, 2012

(1.) We have an Oracle 10g DB.

(2.) We want to store PDFs/MS Word docs inside BLOB column in a table.

(3.) We need to show PDF/MS Word content to the user, without opening the PDFs/MS World like we normally do (i.e. Using PDV reader/ MS Word).

(4.) i.e. We need to use SQL statements and

(a.) Get all contents of the PDF/MS WORD doc.

(b.) Search for specific strings inside these docs in the BLOB columns.

View 6 Replies View Related

Cannot Create BLOB Data Type For A Column In Tavle

Jul 6, 2010

user@tank> create table filetable(id number(6), file_content BLOB);

0 rows affected (0.02 seconds)

vlanke@tank_db> desc filetable;
ID NULL NUMBER(6,0)
FILE_CONTENT NULL

I am new to Database field.

- I created a table with 2 columns id (datatype as number) and file_content datatype as BLOB.
- My question is under desc filetable; query why does it not show me a data type as BLOB.
- create table query does not return any error to me. How do I verify that FILE_CONTENT column has datatype as blob.

View 1 Replies View Related

Windows :: How To Retrieve The Blob Column Data From Table

Mar 7, 2011

I use the oracle 10g database.I am trying to insert and retrive the image.Inserting an image is done.but while retrieving an image iam getting an run time exception in java "java.sql.sqlexception:general error".i am not able to understand this.

The code to insert the image is
FileInputStream fi=new FileInputStream(f);
int size = fi.available();
System.out.println("j"+size);
byte b1[] = new byte[size];
i=fi.read(b1,0,size);
System.out.println("i"+i);
st.executeUpdate("insert into image1 values('b1',"+k+")");
when i am retrieving the image i tried like this
ResultSet rs=st.executeQuery("select imagecolumn from tablename");
here iam getting an exception as i named above.

View 4 Replies View Related

SQL & PL/SQL :: Read Only The Input String From BLOB Datatype Column?

Mar 28, 2013

I have a table that has column with BLOB datatype. I am trying read only the inputted String from the BLOB datatype column. I have used the below query,

SELECT utl_raw.cast_to_varchar2(column1) FROM TAB1
and it gives the result as
<H2><FONT color=#cc0000><EM><U>test</U></EM></FONT></H2>

However I would like to extract only the string "test" which is inputted. Is there any build-in function in oracle which will satisfy this requirement?

View 7 Replies View Related

Forms :: Display Blob Column In A Form (not Image)

Oct 12, 2011

I have a blob column in one table. I need to show it in my form (6i). If i put an image file in the column, it works (because i show it in a Image item type) but if i put a text file in the blob column, it does n´t work.

View 4 Replies View Related

SQL & PL/SQL :: Convert Data In NCLOB Column To BLOB Variable?

May 17, 2010

How can i convert data in NCLOB column to BLOB variable? NCLOB now is tored in UTF16. The data character set is ISO8859P2. Need to keep BLOB at unicode.

View 11 Replies View Related

Forms :: Cannot Display Image From Blob Column In Stored Procedure

Oct 27, 2011

I have a table named PRODUCT (ID Number , ProductImage BLOB). I have inserted some records in. I want to create a form for user to view this table.

When I create Data Block, in Data Block Wizard, if I select option 'Table or View' to retrieve data, it's ok (Data type of item ProductImage is Image, when I run form and query, it display image normally).BUT, I want to retrieve data from stored procedure in a package. This is my package

PACKAGE my_pkg IS
TYPE my_rec IS RECORD
(
myID PRODUCT.ID%TYPE,
myImage PRODUCT.ProductImage%TYPE
);

[code].....

I select option 'Stored Procedure' in Data Block Wizard, then select my stored procedure (my_pkg.Do_Query). Next I choose 2 columns from my stored procedure (ID, ProductImage). The wizard still applys data type of ProductImage as Image. I finish Data Block Wizard and Layout Wizard... run form, query and an error message display:

FRM-40364: The data type of item 'ProductImage' does not match the corresponding column in the stored procedure.

I try to change 'myImage PRODUCT.ProductImage%TYPE' -> 'myImage BLOB' in my package but still get that error.

View 4 Replies View Related

Forms :: How To Store Word / Excel Documents To BLOB Column

Mar 29, 2011

My client system is WinXP.I want to store a Word/Excel document to Oracle Blob column and choosed the command named "piecewise.exe",it seems a free tool on the web, to store the document to oracle,but occausionally failed.So I need alternative which is stable and available.

View 1 Replies View Related

SQL & PL/SQL :: How To Update Data In A Column From Another Column

Dec 28, 2010

I was wondering how can I do below statement in oracle

update table1 t1 set t1.column1 = t2.column2
from table2 t2 inner join table3 t3 on t3.column3=t2.column4
where t3.column5 is null

I tried read up merge and update, but not really understand how the syntax works in oracle.

View 2 Replies View Related

Update New Column Within Same Table

Oct 22, 2010

I have a table ITEM as under;

ARTICLE VRTCODENAMESTATUSNEW_NAME
4KABAN.NM.12.21121143SU19I
4KABAN.NM.12.21564101SU23I
4KABAN.NM.24,5.22491015SR08I
4KABAN.NM.24,5.23181038SR22I
4KABAN.NM.24,5.23491015SR08I
4KABAN.NM.24,5.24121161SR26I

how to update the filed from NAME to NEW_NAME, I need following output.

ARTICLE VRTCODENAMESTATUSNEW_NAME
4KABAN.NM.12.21121143SU19ISU19
4KABAN.NM.12.21564101SU23ISU23
4KABAN.NM.24,5.22491015SR08ISR08
4KABAN.NM.24,5.23181038SR22ISR22
4KABAN.NM.24,5.23491015SR08ISR08
4KABAN.NM.24,5.24121161SR26ISR26

View 2 Replies View Related

SQL & PL/SQL :: Update Same Column With Different Values?

Dec 6, 2012

updating the column values.

Test data:

CREATE TABLE test_at(nr_a NUMBER, nr_id NUMBER) TABLESPACE ECLP_DATA01
INSERT INTO test_att VALUES(90270091,NULL);
INSERT INTO test_att VALUES(90270091,NULL);

[Code].....

I need to update "nr_id" column of test_at table with the values from test_d table. They can be udpated in any order.

I tried to update using rownum but it failed with "single row subquery returns more than 1 row...."

View 16 Replies View Related

SQL & PL/SQL :: Dynamic Update Of Column Name?

Jan 23, 2012

i have creatd view,in which i need to show the entry of year in column wise,though the data is in row /record wise.By iteration i can manipulate the year in decode function like " (DECODE(a.Year,(select distinct max(year)-1 from BI_BALANCE_SHEET), a.Balance))",but is there any way to chachge the alias name /column name,here is the query

select
SUM(DECODE(a.Year,(select distinct max(year)-1 from BI_BALANCE_SHEET), a.Balance)) as year2010,
SUM(DECODE(a.Year,(select distinct max(year)from BI_BALANCE_SHEET) , a.Balance))as Year2011
from DEMO a

View 4 Replies View Related

SQL & PL/SQL :: Get Old Value Of Column In Update Statement

Sep 17, 2007

While updating a table, is it possible to get the old value of a column. I need to get it inside a PLSQL block and not in a trigger.for example :-

DECLARE
l_amountNUMBER(5) := 0;
BEGIN
UPDATECustTransactions
SETamount = 150
WHEREcust_id = 5412
RETURNING amount INTO l_amount;
DBMS_OUTPUT.PUT_LINE ( 'l_amount= ' || l_amount );
END;

By using the RETURNING clause i am getting the new updated value. I need the old value for some processing. Do i have to explicitly query it before the update stmt? Pls reply.

View 6 Replies View Related

SQL & PL/SQL :: How To Update Column Value Without Using Sequences

Apr 17, 2013

I am having a table with out a primary key .It also contains data.

My requirement is to add a new column to the table and update the column value with unique and sequential number , starting from 1 to end of rows.

This has to be done without using a sequence.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved