Skip to content

Commit

Permalink
Merge pull request #5 from gmcve/master
Browse files Browse the repository at this point in the history
uniqueidentifier converted to 255 char string
  • Loading branch information
dnlnln committed Jul 8, 2015
2 parents dc9472b + 22a8dd9 commit 026818a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion master.dbo.sp_generate_merge.sql
Original file line number Diff line number Diff line change
Expand Up @@ -352,13 +352,16 @@ WHILE @Column_ID IS NOT NULL
'COALESCE('''''''' + RTRIM(CONVERT(char,' + @Column_Name + ',127))+'''''''',''NULL'')'
WHEN @Data_Type IN ('uniqueidentifier')
THEN
'COALESCE('''''''' + REPLACE(CONVERT(char(255),RTRIM(' + @Column_Name + ')),'''''''','''''''''''')+'''''''',''NULL'')'
'COALESCE('''''''' + REPLACE(RTRIM(CONVERT(char(255),' + @Column_Name + ')),'''''''','''''''''''')+'''''''',''NULL'')'
WHEN @Data_Type IN ('text')
THEN
'COALESCE('''''''' + REPLACE(CONVERT(varchar(max),' + @Column_Name + '),'''''''','''''''''''')+'''''''',''NULL'')'
WHEN @Data_Type IN ('ntext')
THEN
'COALESCE('''''''' + REPLACE(CONVERT(nvarchar(max),' + @Column_Name + '),'''''''','''''''''''')+'''''''',''NULL'')'
WHEN @Data_Type IN ('xml')
THEN
'COALESCE('''''''' + REPLACE(CONVERT(nvarchar(max),' + @Column_Name + '),'''''''','''''''''''')+'''''''',''NULL'')'
WHEN @Data_Type IN ('binary','varbinary')
THEN
'COALESCE(RTRIM(CONVERT(char,' + 'CONVERT(int,' + @Column_Name + '))),''NULL'')'
Expand Down

0 comments on commit 026818a

Please sign in to comment.