This seems to be one of those concepts that I'm just not able to grasp - looked at other posts here, googled, scoured through help, and I'm still not getting it. I think I'm supposed to use UPDATETEXT, but I'm not sure how.
All I want to do is copy the value of an nText field, which I will name 'LayoutText' from one record to another, within the same table.
I get the error 'The text, ntext, and image data types are invalid in this subquery or aggregate expression' when I try this update:
Thanks in advance.
Kate
[small]"Yeah, it's a non-nutritive cereal varnish. It's semi-permeable. It's not osmotic.[/small]
[small]What it does is it coats and seals the flake, prevents the milk from penetrating it."[/small]
All I want to do is copy the value of an nText field, which I will name 'LayoutText' from one record to another, within the same table.
I get the error 'The text, ntext, and image data types are invalid in this subquery or aggregate expression' when I try this update:
Code:
declare @source_id int
declare @dest_id int
set @source_id = 1
set @dest_id = 2
UPDATE thetable
SET layouttext = (SELECT layouttext FROM thetable WHERE recordid = @source_id)
WHERE recordid = @dest_id
Thanks in advance.
Kate
[small]"Yeah, it's a non-nutritive cereal varnish. It's semi-permeable. It's not osmotic.[/small]
[small]What it does is it coats and seals the flake, prevents the milk from penetrating it."[/small]