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.
Author |
Topic |
timcyberbanjo
Starting Member
3 Posts |
Posted - 2009-05-20 : 00:11:07
|
Hi< I am using SQL Server 2000. I am trying to "copy" an image from one record to the next. The SQL is fine for fields that contain a string, but will not work for an "image"-- this worksUPDATE program_editionSET program_edition_image_width = (SELECT program_edition_image_width FROM program_edition WHERE program_edition_id = 203)WHERE program_edition_id = 202-- this does NOT work (it is trying to copy an image)UPDATE program_editionSET program_edition_image = (SELECT program_edition_image FROM program_edition WHERE program_edition_id = 203)WHERE program_edition_id = 202The error returns "The text, ntext, and image data types are invalid in this subquery or aggregate expression"Could you show me the SQL I need?Thankyou.Tim Saunders check out www.seagrassmusic.com |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-05-20 : 00:16:56
|
use INNER JOINUPDATE tSET program_edition_image = s.program_edition_imageFROM program_edition t INNER JOIN program_edition sON t.program_edition_id = 202AND s.program_edition_id = 203 KH[spoiler]Time is always against us[/spoiler] |
|
|
timcyberbanjo
Starting Member
3 Posts |
Posted - 2009-06-01 : 21:22:21
|
great! Thanks. It works a treat.Tim Saunders check out www.seagrassmusic.com |
|
|
|
|
|