{"id":500,"date":"2012-02-11T15:44:00","date_gmt":"2012-02-11T15:44:00","guid":{"rendered":"\/blogs\/bobb\/post\/New-T-SQL-2012-scalar-functions-(all-but-1)-work-in-SQL-Azure.aspx"},"modified":"2013-01-03T23:59:26","modified_gmt":"2013-01-04T07:59:26","slug":"new-t-sql-2012-scalar-functions-all-but-1-work-in-sql-azure","status":"publish","type":"post","link":"https:\/\/www.sqlskills.com\/blogs\/bobb\/new-t-sql-2012-scalar-functions-all-but-1-work-in-sql-azure\/","title":{"rendered":"New T-SQL 2012 scalar functions (all but 1) work in SQL Azure"},"content":{"rendered":"<p>\nBack when I was saw SQL Azure was producing an @@version string that mentioned version 11 (that&#39;s SQL Server 2012&#39;s major version number), I&#39;d started looking at the version number every week or so. And looking for SQL Server 2012 functionality in SQL Azure. See the blog post &quot;<a href=\"http:\/\/3.209.169.194\/blogs\/bobb\/sql-denali-t-sql-features-in-sql-azure-now\/\" class=\"broken_link\">SQL Denali T-SQL features in SQL Azure now<\/a>&quot; for a list of the first functions supported. I&#39;m not going to list them all again here.<br \/>\nAnd Ed Katibah&#39;s (a.k.a <a href=\"http:\/\/blogs.msdn.com\/b\/edkatibah\/\" class=\"broken_link\">Spatial Ed<\/a>) latest list of <a href=\"http:\/\/social.technet.microsoft.com\/wiki\/contents\/articles\/new-spatial-features-in-the-sql-azure-q2-2011-service-release.aspx\" class=\"broken_link\">SQL Server 2012 spatial functionality in SQL Azure<\/a>.\n<\/p>\n<p>\nThis week, I&#39;d thought to look at the SQL Azure version again. I get:\n<\/p>\n<p>\nMicrosoft SQL Azure (RTM) &#8211; 11.0.1831.30 <br \/>\n&nbsp;Jan 27 2012 23:11:55 <br \/>\n&nbsp;Copyright (c) Microsoft Corporation\n<\/p>\n<p>\nThis is different (newer)&nbsp;than when I previously looked, so its time to look for new T-SQL 2012 functions again. And to find some. 13 of the 14 new T-SQL scalar functions (all of them except TRY_CONVERT, I wonder why that one didn&#39;t make it) are in. That would be: FORMAT, PARSE, TRY_PARSE, IIF, CHOOSE, CONCAT, EOMONTH, and the new &quot;date-from-parts&quot; series.\n<\/p>\n<p>\nIn addition, the T-SQL 2012 updated version of the T-SQL LOG function that allows a logarithm&#39;s base as a second argument works in SQL Azure as well.\n<\/p>\n<p>\nThere&#39;s also one more new function that isn&#39;t mentioned in the books online (I hit it by mistake when I thought I was somehow mistaken about there being a TRY_CONVERT and it works in SQL Server 2012 RC0 as well), that is TRY_CAST. It&#39;s analogous to TRY_CONVERT, as CAST is analogous to CONVERT, modulo CONVERT&#39;s expression and style arguments.\n<\/p>\n<p>\nThis isn&#39;t a complete implementation of SQL Server 2012&#39;s T-SQL improvements in SQL Azure, though. SQL Azure is still waiting for:\n<\/p>\n<p>\n1. Sequences<br \/>\n2. UTF-16 collations with supplimentary characters <br \/>\n3. Windowing (OVER clause enhancements, LAG\/LEAD and others, new analytical functions)\n<\/p>\n<p>\nI didn&#39;t notice any change in spatial support moving more&nbsp;towards to SQL Server 2012 feature set this time, maybe Ed noticed something.\n<\/p>\n<p>\nWell, a bit at a time, I guess. Welcome the new T-SQL functions to SQL Azure.\n<\/p>\n<p>\n@bobbeauch<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Back when I was saw SQL Azure was producing an @@version string that mentioned version 11 (that&#39;s SQL Server 2012&#39;s major version number), I&#39;d started looking at the version number every week or so. And looking for SQL Server 2012 functionality in SQL Azure. See the blog post &quot;SQL Denali T-SQL features in SQL Azure [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27,31,40],"tags":[],"class_list":["post-500","post","type-post","status-publish","format-standard","hentry","category-sql-azure-database","category-sql-server-2012","category-transact-sql"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.9.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>New T-SQL 2012 scalar functions (all but 1) work in SQL Azure - Bob Beauchemin<\/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:\/\/www.sqlskills.com\/blogs\/bobb\/new-t-sql-2012-scalar-functions-all-but-1-work-in-sql-azure\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"New T-SQL 2012 scalar functions (all but 1) work in SQL Azure - Bob Beauchemin\" \/>\n<meta property=\"og:description\" content=\"Back when I was saw SQL Azure was producing an @@version string that mentioned version 11 (that&#039;s SQL Server 2012&#039;s major version number), I&#039;d started looking at the version number every week or so. And looking for SQL Server 2012 functionality in SQL Azure. See the blog post &quot;SQL Denali T-SQL features in SQL Azure [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sqlskills.com\/blogs\/bobb\/new-t-sql-2012-scalar-functions-all-but-1-work-in-sql-azure\/\" \/>\n<meta property=\"og:site_name\" content=\"Bob Beauchemin\" \/>\n<meta property=\"article:published_time\" content=\"2012-02-11T15:44:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2013-01-04T07:59:26+00:00\" \/>\n<meta name=\"author\" content=\"Bob Beauchemin\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Bob Beauchemin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/new-t-sql-2012-scalar-functions-all-but-1-work-in-sql-azure\/\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/new-t-sql-2012-scalar-functions-all-but-1-work-in-sql-azure\/\",\"name\":\"New T-SQL 2012 scalar functions (all but 1) work in SQL Azure - Bob Beauchemin\",\"isPartOf\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/#website\"},\"datePublished\":\"2012-02-11T15:44:00+00:00\",\"dateModified\":\"2013-01-04T07:59:26+00:00\",\"author\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/#\/schema\/person\/62bfa986c5b5d28fcffd8b4fc409c73e\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/new-t-sql-2012-scalar-functions-all-but-1-work-in-sql-azure\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.sqlskills.com\/blogs\/bobb\/new-t-sql-2012-scalar-functions-all-but-1-work-in-sql-azure\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/new-t-sql-2012-scalar-functions-all-but-1-work-in-sql-azure\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Azure SQL Database\",\"item\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/category\/sql-azure-database\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"New T-SQL 2012 scalar functions (all but 1) work in SQL Azure\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/#website\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/\",\"name\":\"Bob Beauchemin\",\"description\":\"SQL Server Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/#\/schema\/person\/62bfa986c5b5d28fcffd8b4fc409c73e\",\"name\":\"Bob Beauchemin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6f80e6cc667410857fa6a21931dc528b8092f4d112bf7a8ff7c267674d44ee37?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6f80e6cc667410857fa6a21931dc528b8092f4d112bf7a8ff7c267674d44ee37?s=96&d=mm&r=g\",\"caption\":\"Bob Beauchemin\"},\"sameAs\":[\"http:\/www.sqlskills.com\/blogs\/bobb\/\"],\"url\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/author\/bobb\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"New T-SQL 2012 scalar functions (all but 1) work in SQL Azure - Bob Beauchemin","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:\/\/www.sqlskills.com\/blogs\/bobb\/new-t-sql-2012-scalar-functions-all-but-1-work-in-sql-azure\/","og_locale":"en_US","og_type":"article","og_title":"New T-SQL 2012 scalar functions (all but 1) work in SQL Azure - Bob Beauchemin","og_description":"Back when I was saw SQL Azure was producing an @@version string that mentioned version 11 (that&#39;s SQL Server 2012&#39;s major version number), I&#39;d started looking at the version number every week or so. And looking for SQL Server 2012 functionality in SQL Azure. See the blog post &quot;SQL Denali T-SQL features in SQL Azure [&hellip;]","og_url":"https:\/\/www.sqlskills.com\/blogs\/bobb\/new-t-sql-2012-scalar-functions-all-but-1-work-in-sql-azure\/","og_site_name":"Bob Beauchemin","article_published_time":"2012-02-11T15:44:00+00:00","article_modified_time":"2013-01-04T07:59:26+00:00","author":"Bob Beauchemin","twitter_misc":{"Written by":"Bob Beauchemin","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/new-t-sql-2012-scalar-functions-all-but-1-work-in-sql-azure\/","url":"https:\/\/www.sqlskills.com\/blogs\/bobb\/new-t-sql-2012-scalar-functions-all-but-1-work-in-sql-azure\/","name":"New T-SQL 2012 scalar functions (all but 1) work in SQL Azure - Bob Beauchemin","isPartOf":{"@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/#website"},"datePublished":"2012-02-11T15:44:00+00:00","dateModified":"2013-01-04T07:59:26+00:00","author":{"@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/#\/schema\/person\/62bfa986c5b5d28fcffd8b4fc409c73e"},"breadcrumb":{"@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/new-t-sql-2012-scalar-functions-all-but-1-work-in-sql-azure\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sqlskills.com\/blogs\/bobb\/new-t-sql-2012-scalar-functions-all-but-1-work-in-sql-azure\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/new-t-sql-2012-scalar-functions-all-but-1-work-in-sql-azure\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sqlskills.com\/blogs\/bobb\/"},{"@type":"ListItem","position":2,"name":"Azure SQL Database","item":"https:\/\/www.sqlskills.com\/blogs\/bobb\/category\/sql-azure-database\/"},{"@type":"ListItem","position":3,"name":"New T-SQL 2012 scalar functions (all but 1) work in SQL Azure"}]},{"@type":"WebSite","@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/#website","url":"https:\/\/www.sqlskills.com\/blogs\/bobb\/","name":"Bob Beauchemin","description":"SQL Server Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sqlskills.com\/blogs\/bobb\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/#\/schema\/person\/62bfa986c5b5d28fcffd8b4fc409c73e","name":"Bob Beauchemin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6f80e6cc667410857fa6a21931dc528b8092f4d112bf7a8ff7c267674d44ee37?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6f80e6cc667410857fa6a21931dc528b8092f4d112bf7a8ff7c267674d44ee37?s=96&d=mm&r=g","caption":"Bob Beauchemin"},"sameAs":["http:\/www.sqlskills.com\/blogs\/bobb\/"],"url":"https:\/\/www.sqlskills.com\/blogs\/bobb\/author\/bobb\/"}]}},"_links":{"self":[{"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/posts\/500","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/comments?post=500"}],"version-history":[{"count":0,"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/posts\/500\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/media?parent=500"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/categories?post=500"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/tags?post=500"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}