Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How to import exported images from SQL Server

Author  Topic 

sballepu
Starting Member

2 Posts

Posted - 2008-03-31 : 21:23:20
Hello,

Here is my problem:
There is some data which we need to move from a vendor database to our Oracle database. The vendor has provided us with the exported data from their database. The data is in a text file with some delimiters to identify where each column value ends.

One of the table columns extracted has an image. I dont have real image files, but I have the image in the exported format (hex value - something like 'FFD8FFE000104A46494600010001009600960000FFFE001...". Now I need to import this as a image into a LONG RAW or BLOB column in Oracle database. But it is not possible to do so in Oracle, so we have planned a work around for this.

1) Import the data back into SQL Server
2) Export the actual image files(.jpeg or .gif) on the desktop
3) Import the image files from desktop to Oracle database.


The text file that contains table information has rows like below.
2~jones~jenny~j~bad show~1989-05-14 00:00:00.000~304303F.......
(last value should go into an image column)

I would like to know how to import such hex-stored image data into image column in database table. I have tried to direct import using BULK INSERT, but doesn't work.

I would appriciate if someone can provide some working code as well, which shows how to achieve the above functionality.

Thanks.

KenW
Constraint Violating Yak Guru

391 Posts

Posted - 2008-04-01 : 13:45:42
This is a MS SQL Server specific forum. Since you're asking an Oracle question, you should probably ask it in an Oracle forum instead.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-04-02 : 05:01:31
www.orafaq.com
www.dbforums.com

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

sballepu
Starting Member

2 Posts

Posted - 2008-04-02 : 13:37:57
Now my goal is to import the image into SQL Server only. Please let me know how can I import the image in that hex format in text file into an image column in SQL server database
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-04-03 : 02:17:17
http://databases.aspfaq.com/database/should-i-store-images-in-the-database-or-the-filesystem.html
http://www.sqlteam.com/article/images-and-sql-server

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -