Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stop nvarchar(max) from coming back as a memo
Message
De
27/09/2012 18:58:17
 
 
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:
01553800
Vues:
44
>>>>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))
That worked, thanks
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform