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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Convert Types

Author  Topic 

baska123
Yak Posting Veteran

64 Posts

Posted - 2007-05-11 : 11:49:17
I am getting an error 'Server: Msg 2739, Level 16, State 1, Line 1
The text, ntext, and image data types are invalid for local variables.'

How do I fix it in my statement -
SET @PROGRESS= (select OC_NAME from ProjectServer..MSP_OUTLINE_CODES WHERE CODE_UID = @CODE_UID and PROJ_ID = @GlbProjID)

OC_NAME is text 16 and @progress is varchar(50)

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-05-11 : 11:53:13
is @PROGRESS of type text, ntext or image?
because you can't have them as variables.

In sql server 2005 use new varchar(max), nvarchar(max) on varbinary(max) instead.

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-05-11 : 23:11:57
One of the variables is declared as text, ntext, or image datatype

Post the full code

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -