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 |
cidmi.dovic
Yak Posting Veteran
53 Posts |
Posted - 2008-06-13 : 19:16:55
|
I'm trying to cast a Ntext field to varchar and the output is "The text, ntext, and image data types are invalid in this subquery or aggregate expression."Declare @a as varchar(8000)Set @a = Cast((Select ntextfield from db wher Pk=1) as varchar(8000))I read in the help that it's possible a conversion between ntext and varchar. Am I wrong? Thanks in advance.The Padrón peppers itch and other don't |
|
cidmi.dovic
Yak Posting Veteran
53 Posts |
Posted - 2008-06-13 : 19:30:03
|
Easy solution,Set @a = (Select cast(varchar(8000),ntextfield) from db wher Pk=1)The Padrón peppers itch and other don't |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-06-14 : 13:01:09
|
quote: Originally posted by cidmi.dovic Easy solution,Set @a = (Select convert(varchar(8000),ntextfield) from db wher Pk=1)The Padrón peppers itch and other don't
MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|