Hi Team,
Here's the requirement.
I have a image file in jpg format in unix.
Now I need to
i. convert the jpg format to binary format
ii. followed by loading the binary file to Oracle db.
Can anyone help me out?
Thanks
Krishnakanth Manivannan
Hi Team,
Here's the requirement.
I have a image file in jpg format in unix.
Now I need to
i. convert the jpg format to binary format
ii. followed by loading the binary file to Oracle db.
Can anyone help me out?
Thanks
Krishnakanth Manivannan
Not sure why r u converting into binary format.
You can easily store jpeg file into oracle as below
CREATE TABLE mak_test (
iblob BLOB NOT NULL
)
INSERT INTO mak_test
VALUES (utl_raw.cast_to_raw('C:\mak\mak.jpeg'));
My requirement is I need to insert the jpg file into the Oracle table through Datastage (ETL tool). Datastage is unable to read the jpg file. Hence converting to binary format and loading into table.
Please let me know if there is any alternate way to perform this insert.
Please advice.
Thanks
Krishnakanth Manivannan
What do you mean by "binary format"? jpg is already binary. What exactly would your datastage be able to read?
As Corona688 has stated it is already a binary.
How about changing the extension to .RAW, (.raw), and see what occurs...