Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2008
»
SQL Server 2008 - General
»
SSIS to extract photos in correct jpg format
SSIS to extract photos in correct jpg format
Rate Topic
Display Mode
Topic Options
Author
Message
sridhar_kola
sridhar_kola
Posted Wednesday, August 08, 2012 1:21 AM
Grasshopper
Group: General Forum Members
Last Login: Thursday, May 02, 2013 1:28 AM
Points: 18,
Visits: 133
The job is to extract the photos from the SQL table into .jpg format.
I have created an SSIS package and used an Export column to extract the photos. I used a derived column to give the extention as .jpg
Apparently , even though the photos are being extracted with an extension of .jpg , its actually not .jpg but .bmp.
Any idea how we extract the photos in valid .jpg format ?
Post #1341705
anthony.green
anthony.green
Posted Wednesday, August 08, 2012 1:46 AM
SSCertifiable
Group: General Forum Members
Last Login: Friday, April 12, 2013 3:51 AM
Points: 5,075,
Visits: 4,831
Was the binary data uploaded as a jpg or a bmp?
Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1
&
Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger
Post #1341709
sridhar_kola
sridhar_kola
Posted Wednesday, August 08, 2012 2:51 AM
Grasshopper
Group: General Forum Members
Last Login: Thursday, May 02, 2013 1:28 AM
Points: 18,
Visits: 133
I am afraid I dont know .. thats the legacy data ..
Post #1341734
anthony.green
anthony.green
Posted Wednesday, August 08, 2012 3:07 AM
SSCertifiable
Group: General Forum Members
Last Login: Friday, April 12, 2013 3:51 AM
Points: 5,075,
Visits: 4,831
Well more than likely was inserted as BMP, so you would need to extract them and convert them in a picture editor and re-upload them to the DB.
Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1
&
Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger
Post #1341744
sridhar_kola
sridhar_kola
Posted Wednesday, August 08, 2012 4:03 AM
Grasshopper
Group: General Forum Members
Last Login: Thursday, May 02, 2013 1:28 AM
Points: 18,
Visits: 133
Yeah agree.. but imagine if we have almost 500K pictures to convert .. What would be the best approach then ?
Post #1341767
anthony.green
anthony.green
Posted Wednesday, August 08, 2012 4:07 AM
SSCertifiable
Group: General Forum Members
Last Login: Friday, April 12, 2013 3:51 AM
Points: 5,075,
Visits: 4,831
cant help you on that, thought it would have to be manually 1 by 1 as you will need to open the files and save them as jpg then re-upload
Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1
&
Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger
Post #1341769
HowardW
HowardW
Posted Wednesday, August 08, 2012 4:27 AM
Ten Centuries
Group: General Forum Members
Last Login: Yesterday @ 6:36 AM
Points: 1,035,
Visits: 7,671
You'd have to either:
1) Use a script transformation task (this is just pure .Net code), then just use one of the examples of converting a
bmp file to a jpg
in code
2) Save them as a .bmp, then shell out to a
command line utility
to do the same thing
Post #1341774
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.