why cann't i copy an image datatype from one table to another

why cann't i copy an image datatype from one table to another

Post by Wheres Wall » Sat, 28 Jun 2003 01:41:17


Hi,
I have a table that contains images(an image data type fields). I want to
copy certain images from that table to another table(also image data type),
using the following statement

update tbl_property set image = (select thumbimage from tbl_propertyimage
where property_id =1).

I get an error saying :

Server: Msg 279, Level 16, State 3, Line 1
The text, ntext, and image data types are invalid in this subquery or
aggregate expression.

How can I copy the image data ?

 
 
 

why cann't i copy an image datatype from one table to another

Post by Dinesh.T. » Sat, 28 Jun 2003 01:59:34


Waldo,

Refer 'UPDATETEXT' in BooksOnLine.The below code should get you started


--image datatype columns should be initialised first
UPDATE tbl_property
   SET [image] = ''


                             FROM tbl_propertyimage WHERE property_id =1)

                                    FROM tbl_property WHERE pkcol =  )



--
Dinesh.
SQL Server FAQ at
http://www.tkdinesh.com


Quote:> Hi,
> I have a table that contains images(an image data type fields). I want to
> copy certain images from that table to another table(also image data
type),
> using the following statement

> update tbl_property set image = (select thumbimage from tbl_propertyimage
> where property_id =1).

> I get an error saying :

> Server: Msg 279, Level 16, State 3, Line 1
> The text, ntext, and image data types are invalid in this subquery or
> aggregate expression.

> How can I copy the image data ?