Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can Compare Binary Data?

Status
Not open for further replies.

VVVA

Technical User
Sep 19, 2006
35
US
I am attempting to figure out if images I have stored in a SQL table are .tif or .jpg. Looking at the data, it is easy to tell that all of the .jpg images begin with a certain pattern (0xFFD8FF). Is there any way I can cast the image as another data type, and compare it?

I've tried this, and it doesn't work.

Code:
  cast(img as binary) like '0xFF%'


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top