{"id":1113,"date":"2005-09-27T19:46:00","date_gmt":"2005-09-28T00:46:00","guid":{"rendered":"http:\/\/blogs.devhorizon.com\/reza\/?p=1113"},"modified":"2005-09-27T19:46:00","modified_gmt":"2005-09-28T00:46:00","slug":"sql-server-collation-and-reporting-services-behaviour","status":"publish","type":"post","link":"https:\/\/blogs.devhorizon.com\/reza\/2005\/09\/27\/sql-server-collation-and-reporting-services-behaviour\/","title":{"rendered":"SQL Server collation and Reporting Services behaviour"},"content":{"rendered":"<p><P class=MsoNormal style=\"MARGIN: 0in 0in 0pt\"><SPAN style=\"FONT-SIZE: 10pt; FONT-FAMILY: Arial\">Recently I&#8217;ve came across another strange issue with reporting serivces.I&#8217;m hopping that&nbsp;all these stuff are well addressed in Yukon version ,or else \ud83d\ude42 .I<\/SPAN><SPAN style=\"FONT-SIZE: 10pt; FONT-FAMILY: Arial\">&nbsp;didn&#8217;t make the database <SPAN style=\"COLOR: black\">case sensitive collation&nbsp;in the setup and case sensitive collation&nbsp;was not also activated in any of the columns throughout the database.<\/SPAN> In one of my tables, there is a column called &#8220;Client_Type&#8221; which is of type Varchar and unfortunately there are some bad data sitting there (might be because of wrong UI validations or data conversion or whatever).Below is different chunks of data in that column.<\/SPAN><\/P><br \/>\n<P class=MsoNormal style=\"MARGIN: 0in 0in 0pt\"><SPAN style=\"FONT-SIZE: 10pt; FONT-FAMILY: Arial\"><\/SPAN>&nbsp;<\/P><br \/>\n<P class=MsoNormal style=\"MARGIN: 0in 0in 0pt\"><SPAN style=\"FONT-SIZE: 10pt; FONT-FAMILY: Arial\">PRIMARY<\/SPAN><?xml:namespace prefix = o ns = \"urn:schemas-microsoft-com:office:office\" \/><o:p><\/o:p><\/P><br \/>\n<P class=MsoNormal style=\"MARGIN: 0in 0in 0pt\"><SPAN style=\"FONT-SIZE: 10pt; FONT-FAMILY: Arial\">PRIMARY MAKER <\/SPAN><o:p><\/o:p><\/P><br \/>\n<P class=MsoNormal style=\"MARGIN: 0in 0in 0pt\"><SPAN style=\"FONT-SIZE: 10pt; FONT-FAMILY: Arial\">SECONDARY<\/SPAN><o:p><\/o:p><\/P><br \/>\n<P class=MsoNormal style=\"MARGIN: 0in 0in 0pt\"><SPAN style=\"FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-weight: bold\">Primary<\/SPAN><o:p><\/o:p><\/P><br \/>\n<P class=MsoNormal style=\"MARGIN: 0in 0in 0pt\"><SPAN style=\"FONT-SIZE: 10pt; FONT-FAMILY: Arial\">Primary Maker<\/SPAN><o:p><\/o:p><\/P><br \/>\n<P class=MsoNormal style=\"MARGIN: 0in 0in 0pt\"><SPAN style=\"FONT-SIZE: 10pt; FONT-FAMILY: Arial\">Secondary<\/SPAN><\/P><br \/>\n<P class=MsoNormal style=\"MARGIN: 0in 0in 0pt\"><SPAN style=\"FONT-SIZE: 10pt; FONT-FAMILY: Arial\"><\/SPAN>&nbsp;<\/P><br \/>\n<P class=MsoNormal style=\"MARGIN: 0in 0in 0pt\"><SPAN style=\"FONT-SIZE: 10pt; FONT-FAMILY: Arial\"><\/SPAN><SPAN style=\"FONT-SIZE: 10pt; FONT-FAMILY: Arial\">From database standpoint, there is no difference between &#8220;Primary&#8221; and &#8220;PRIMARY&#8221; (which is obvious as I didn&#8217;t activate &#8220;<SPAN style=\"COLOR: black\">case sensitive collation&#8221;<\/SPAN>),but when it comes to Reporting services it DOSE matter!! specifically in <U>formulas and string manipulation functions<\/U>. How come it is case sensitive in reporting services whilst is not in its backend database ?!!! <\/SPAN><\/P><br \/>\n<P class=MsoNormal style=\"MARGIN: 0in 0in 0pt\"><SPAN style=\"FONT-SIZE: 10pt; FONT-FAMILY: Arial\"><\/SPAN><SPAN style=\"FONT-SIZE: 10pt; FONT-FAMILY: Arial\">There is a possible workaround for this. Add ToString().ToUpper() to all field values used in comparisons. Of course changing the collation&nbsp;of the database is another possibility,but&nbsp;Just for your reference, specifying collation is usually done for the whole server in the installation of sql server and changing one database collation afterward is a bit tricky ,because <SPAN style=\"COLOR: black\">if you have one database on a server which has a different collation to the server default, it will also have a different collation to TEMPDB. This can cause unexpected problems with sorting of results, and handling of #temp table data. Better, if you can, to get the whole server at the right collation.<\/SPAN><o:p><\/o:p><\/SPAN><\/P><br \/>\n<P class=MsoNormal style=\"MARGIN: 0in 0in 0pt\"><SPAN style=\"FONT-SIZE: 10pt; FONT-FAMILY: Arial\"><o:p>&nbsp;<\/o:p><\/SPAN><\/P><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently I&#8217;ve came across another strange issue with reporting serivces.I&#8217;m hopping that&nbsp;all these stuff are well addressed in Yukon version ,or else \ud83d\ude42 .I&nbsp;didn&#8217;t make the database case sensitive collation&nbsp;in the setup and case sensitive collation&nbsp;was not also activated in any of the columns throughout the database. In one of my tables, there is a [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-1113","post","type-post","status-publish","format-standard","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>SQL Server collation and Reporting Services behaviour - Reza Alirezaei&#039;s Blog %<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blogs.devhorizon.com\/reza\/2005\/09\/27\/sql-server-collation-and-reporting-services-behaviour\/\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Reza Alirezaei\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/2005\\\/09\\\/27\\\/sql-server-collation-and-reporting-services-behaviour\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/2005\\\/09\\\/27\\\/sql-server-collation-and-reporting-services-behaviour\\\/\"},\"author\":{\"name\":\"Reza Alirezaei\",\"@id\":\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/#\\\/schema\\\/person\\\/cdbb24d283697a65951cb4a14e474938\"},\"headline\":\"SQL Server collation and Reporting Services behaviour\",\"datePublished\":\"2005-09-28T00:46:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/2005\\\/09\\\/27\\\/sql-server-collation-and-reporting-services-behaviour\\\/\"},\"wordCount\":294,\"commentCount\":0,\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/2005\\\/09\\\/27\\\/sql-server-collation-and-reporting-services-behaviour\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/2005\\\/09\\\/27\\\/sql-server-collation-and-reporting-services-behaviour\\\/\",\"url\":\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/2005\\\/09\\\/27\\\/sql-server-collation-and-reporting-services-behaviour\\\/\",\"name\":\"SQL Server collation and Reporting Services behaviour - Reza Alirezaei's Blog %\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/#website\"},\"datePublished\":\"2005-09-28T00:46:00+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/#\\\/schema\\\/person\\\/cdbb24d283697a65951cb4a14e474938\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/2005\\\/09\\\/27\\\/sql-server-collation-and-reporting-services-behaviour\\\/\"]}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/#website\",\"url\":\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/\",\"name\":\"Reza Alirezaei's Blog\",\"description\":\"Blogging from the field!\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/#\\\/schema\\\/person\\\/cdbb24d283697a65951cb4a14e474938\",\"name\":\"Reza Alirezaei\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3ba940d84e0ecb909e62e93df4c56daf0395c7e53c914467ab2ee73124a7d7b6?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3ba940d84e0ecb909e62e93df4c56daf0395c7e53c914467ab2ee73124a7d7b6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3ba940d84e0ecb909e62e93df4c56daf0395c7e53c914467ab2ee73124a7d7b6?s=96&d=mm&r=g\",\"caption\":\"Reza Alirezaei\"},\"url\":\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/author\\\/rezaa\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SQL Server collation and Reporting Services behaviour - Reza Alirezaei's Blog %","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blogs.devhorizon.com\/reza\/2005\/09\/27\/sql-server-collation-and-reporting-services-behaviour\/","twitter_misc":{"Written by":"Reza Alirezaei","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blogs.devhorizon.com\/reza\/2005\/09\/27\/sql-server-collation-and-reporting-services-behaviour\/#article","isPartOf":{"@id":"https:\/\/blogs.devhorizon.com\/reza\/2005\/09\/27\/sql-server-collation-and-reporting-services-behaviour\/"},"author":{"name":"Reza Alirezaei","@id":"https:\/\/blogs.devhorizon.com\/reza\/#\/schema\/person\/cdbb24d283697a65951cb4a14e474938"},"headline":"SQL Server collation and Reporting Services behaviour","datePublished":"2005-09-28T00:46:00+00:00","mainEntityOfPage":{"@id":"https:\/\/blogs.devhorizon.com\/reza\/2005\/09\/27\/sql-server-collation-and-reporting-services-behaviour\/"},"wordCount":294,"commentCount":0,"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/blogs.devhorizon.com\/reza\/2005\/09\/27\/sql-server-collation-and-reporting-services-behaviour\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/blogs.devhorizon.com\/reza\/2005\/09\/27\/sql-server-collation-and-reporting-services-behaviour\/","url":"https:\/\/blogs.devhorizon.com\/reza\/2005\/09\/27\/sql-server-collation-and-reporting-services-behaviour\/","name":"SQL Server collation and Reporting Services behaviour - Reza Alirezaei's Blog %","isPartOf":{"@id":"https:\/\/blogs.devhorizon.com\/reza\/#website"},"datePublished":"2005-09-28T00:46:00+00:00","author":{"@id":"https:\/\/blogs.devhorizon.com\/reza\/#\/schema\/person\/cdbb24d283697a65951cb4a14e474938"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blogs.devhorizon.com\/reza\/2005\/09\/27\/sql-server-collation-and-reporting-services-behaviour\/"]}]},{"@type":"WebSite","@id":"https:\/\/blogs.devhorizon.com\/reza\/#website","url":"https:\/\/blogs.devhorizon.com\/reza\/","name":"Reza Alirezaei's Blog","description":"Blogging from the field!","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blogs.devhorizon.com\/reza\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blogs.devhorizon.com\/reza\/#\/schema\/person\/cdbb24d283697a65951cb4a14e474938","name":"Reza Alirezaei","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/3ba940d84e0ecb909e62e93df4c56daf0395c7e53c914467ab2ee73124a7d7b6?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/3ba940d84e0ecb909e62e93df4c56daf0395c7e53c914467ab2ee73124a7d7b6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3ba940d84e0ecb909e62e93df4c56daf0395c7e53c914467ab2ee73124a7d7b6?s=96&d=mm&r=g","caption":"Reza Alirezaei"},"url":"https:\/\/blogs.devhorizon.com\/reza\/author\/rezaa\/"}]}},"_links":{"self":[{"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/posts\/1113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/comments?post=1113"}],"version-history":[{"count":0,"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/posts\/1113\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/media?parent=1113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/categories?post=1113"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/tags?post=1113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}