Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stop nvarchar(max) from coming back as a memo
Message
 
 
To
27/09/2012 18:42:32
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2008
Miscellaneous
Thread ID:
01553795
Message ID:
01553799
Views:
43
>>>Hi again, all
>>>
>>>I have some fields in my SQL table defined as nvarchar(max), mostly because I have no idea how long the string might be. Unfortunately, when I pull a record back they come across as a Memo field, which I don't really need.
>>>
>>>Is there any way to stop this behavior? Bad SQL! no SQL cookies!
>>
>>You can select LEFT(nvarcharColumn, 250) to make it a character.
>
>Still returns a memo

Try
cast(nvarcharCol as varchar(240))
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform