Skip to content

Instantly share code, notes, and snippets.

@steppefox
Created November 13, 2013 06:04
Show Gist options
  • Save steppefox/7444466 to your computer and use it in GitHub Desktop.
Save steppefox/7444466 to your computer and use it in GitHub Desktop.
MSSQL - fix for bug, when DB sends you cutted string (253-255 characters) from text field

Somehow the datatype is "char", which apparently is limited to 255 characters. BUT the DB is storing more than 255 characters.

Converting the field to TEXT works perfectly for some reason.

SELECT CONVERT(TEXT,fld_name) FROM TABLE_NAME

answered Jun 2 '10 at 21:30

Derek Adair

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment