Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uniqueidentifier converted to 255 char string #5

Merged
merged 2 commits into from
Jul 8, 2015
Merged

Conversation

gmcve
Copy link
Contributor

@gmcve gmcve commented Jan 14, 2015

uniqueidentifier are converted to a 255 char string so the first 36 chars are
followed by 219 blank spaces.

I moved the RTRIM

DECLARE @Column_Name UNIQUEIDENTIFIER = 'EDAB8EA9-76D1-45EE-BC09-93CBDB63A54A'
SELECT COALESCE('''' + REPLACE(CONVERT(char(255),RTRIM(@Column_Name)),'''','''''')+'''','NULL')
SELECT COALESCE('''' + REPLACE(RTRIM(CONVERT(char(255),@Column_Name)),'''','''''')+'''','NULL')

uniqueidentifier converted to 255 char string so the first 36 chars are
followed by 219 blank spaces
@zippy1981
Copy link
Contributor

Why not convert to CHAR(36)?

XML Columns not outputted correctly
dnlnln added a commit that referenced this pull request Jul 8, 2015
uniqueidentifier converted to 255 char string
@dnlnln dnlnln merged commit 026818a into dnlnln:master Jul 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants