{"id":215,"date":"2010-07-29T12:02:37","date_gmt":"2010-07-29T02:02:37","guid":{"rendered":"http:\/\/jcrawfor74.wordpress.com\/?p=215"},"modified":"2010-07-29T12:02:37","modified_gmt":"2010-07-29T02:02:37","slug":"sql-server-excel-and-soft-returns","status":"publish","type":"post","link":"https:\/\/ntsblog.homedev.com.au\/index.php\/2010\/07\/29\/sql-server-excel-and-soft-returns\/","title":{"rendered":"SQL Server Excel and Soft Returns"},"content":{"rendered":"<div id=\"ntsbl-4187009923\" class=\"ntsbl-before-content ntsbl-entity-placement\"><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-6288941070289539\" crossorigin=\"anonymous\"><\/script><ins class=\"adsbygoogle\" style=\"display:inline-block;width:728px;height:90px;\" \ndata-ad-client=\"ca-pub-6288941070289539\" \ndata-ad-slot=\"9356781486\"><\/ins> \n<script> \n(adsbygoogle = window.adsbygoogle || []).push({}); \n<\/script>\n<\/div><p>Many moons before reporting services existed, I was involved in writing a report architecture which was based upon SQL server and MS Excel. <\/p>\n<p>In short sql queries were executed and data dumped into excel and then formatted via embedded macros.<\/p>\n<p>In Excel a Soft Return is done by pressing &#8216;Alt + Enter&#8217;. In some cases you may return a 1:Many relationship as a single string and want to delimit it with a carriage return between each element.<\/p>\n<p>To get this to work in Excel you need to use the Ascii code for {LF} which is Char(10).<\/p>\n<p>So that way your comma delimited string can appear with newlines, and turn on wrap in the column and the data formats nicely in excel.<\/p>\n<p>Probably not useful for anyone else, but I needed to do this again today and do you think I could remember the Ascii code&#8230;. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Many moons before reporting services existed, I was involved in writing a report architecture which was based upon SQL server and MS Excel. In short [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[13],"tags":[],"class_list":["post-215","post","type-post","status-publish","format-standard","hentry","category-sql-server"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/posts\/215","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/comments?post=215"}],"version-history":[{"count":1,"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/posts\/215\/revisions"}],"predecessor-version":[{"id":2173,"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/posts\/215\/revisions\/2173"}],"wp:attachment":[{"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/media?parent=215"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/categories?post=215"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/tags?post=215"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}