September 10, 2008 at 12:54 pm
Hi,
how to Compare two IMAGE fields, i try the following:-
SELECT itemphoto.item_no, itemphoto.photo
FROM [2560].[2560].itemphoto itemphoto ,[erpinv41].[ims].itemphoto MAINPHOTO
where itemphoto.photo <> MAINPHOTO.photo
but i get the follwoing error:-
Msg 402, Level 16, State 1, Line 1
The data types image and image are incompatible in the not equal to operator.
best regards
September 10, 2008 at 2:57 pm
Convert the image field to varbinary to do your comparison.
create table foo
(
img image
)
go
select *
from foo a, foo b
WHERE convert(varbinary,a.img) = convert(varbinary,b.img)
Gary Johnson
Sr Database Engineer
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy