Problem with Stored Procedure



I have this in my stored procedure:

@PageID INT,
@VersionID INT

UPDATE Pages SET MainData = (SELECT MainData FROM Pages_Archive WHERE PageID = @PageID AND VersionID = @VersionID)
WHERE PageID = @PageID



I get this error: "Error 279: The text, ntext, and image data types are invalid in this subquery or aggregate expression."

MainData is of type "text"

However, I have done this same things before in an INSERT statement. Does it not work for UPDATE?

Thanks.

-Phil

.



Relevant Pages

  • Re: Problem with Stored Procedure
    ... UPDATE Pages SET MainData = (SELECT MainData FROM Pages_Archive WHERE ... WHERE PageID = @PageID ... Please reply to the newsgroup. ...
    (microsoft.public.inetserver.asp.db)
  • Re: Problem with Stored Procedure
    ... UPDATE Pages SET MainData = (SELECT MainData FROM Pages_Archive WHERE ... WHERE PageID = @PageID ... I get this error: "Error 279: The text, ntext, and image data types ... Please reply to the newsgroup. ...
    (microsoft.public.inetserver.asp.db)

Loading