Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stop nvarchar(max) from coming back as a memo
Message
 
 
À
27/09/2012 18:42:32
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2008
Divers
Thread ID:
01553795
Message ID:
01553799
Vues:
42
>>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform