Report Writing https://blog.iatric.com/report-writing-blog Cerner reports, CPSI reports, Epic reports, McKesson reports, MEDITECH reports en-us Tue, 07 Dec 2021 13:00:05 GMT 2021-12-07T13:00:05Z en-us T-SQL- Guaranteeing the Database Context in Dynamic SQL https://blog.iatric.com/report-writing-blog/t-sql-guaranteeing-the-database-context-in-dynamic-sql <div class="hs-featured-image-wrapper"> <a href="https://blog.iatric.com/report-writing-blog/t-sql-guaranteeing-the-database-context-in-dynamic-sql" title="" class="hs-featured-image-link"> <img src="https://blog.iatric.com/hubfs/social-media-images/RWS_Blog_TSQL_social.jpg" alt="T-SQL- Guaranteeing the Database Context in Dynamic SQL" class="hs-featured-image" style="width:auto !important; max-width:50%; float:left; margin:0 15px 15px 0;"> </a> </div> <p><span style="color: black;">It is rare that this will come up, but in certain circumstances you may need to change (or guarantee) the database in which a query executes.</span></p> <p><span style="font-weight: normal;">This can really plague you when you’re working with multiple databases on multiple servers. You don’t want to forget which database you’re in… and execute code in the wrong place.</span></p> <div class="hs-featured-image-wrapper"> <a href="https://blog.iatric.com/report-writing-blog/t-sql-guaranteeing-the-database-context-in-dynamic-sql" title="" class="hs-featured-image-link"> <img src="https://blog.iatric.com/hubfs/social-media-images/RWS_Blog_TSQL_social.jpg" alt="T-SQL- Guaranteeing the Database Context in Dynamic SQL" class="hs-featured-image" style="width:auto !important; max-width:50%; float:left; margin:0 15px 15px 0;"> </a> </div> <p><span style="color: black;">It is rare that this will come up, but in certain circumstances you may need to change (or guarantee) the database in which a query executes.</span></p> <p><span style="font-weight: normal;">This can really plague you when you’re working with multiple databases on multiple servers. You don’t want to forget which database you’re in… and execute code in the wrong place.</span></p> <img src="https://track.hubspot.com/__ptq.gif?a=395219&amp;k=14&amp;r=https%3A%2F%2Fblog.iatric.com%2Freport-writing-blog%2Ft-sql-guaranteeing-the-database-context-in-dynamic-sql&amp;bu=https%253A%252F%252Fblog.iatric.com%252Freport-writing-blog&amp;bvt=rss" alt="" width="1" height="1" style="min-height:1px!important;width:1px!important;border-width:0!important;margin-top:0!important;margin-bottom:0!important;margin-right:0!important;margin-left:0!important;padding-top:0!important;padding-bottom:0!important;padding-right:0!important;padding-left:0!important; "> Report Writing Services MEDITECH Data Repository Report Writing Tips and Tricks SSRS SQL Tue, 07 Dec 2021 13:00:00 GMT info@iatric.com (Thomas Harlan, Jim McGrath; Reporting Services Team - iatricSystems) https://blog.iatric.com/report-writing-blog/t-sql-guaranteeing-the-database-context-in-dynamic-sql 2021-12-07T13:00:00Z T-SQL- Error: “Cannot resolve the collation conflict between…” https://blog.iatric.com/report-writing-blog/t-sql-error-cannot-resolve-the-collation-conflict-between <div class="hs-featured-image-wrapper"> <a href="https://blog.iatric.com/report-writing-blog/t-sql-error-cannot-resolve-the-collation-conflict-between" title="" class="hs-featured-image-link"> <img src="https://blog.iatric.com/hubfs/social-media-images/RWS_Blog_Error_social.jpg" alt="T-SQL- Error: “Cannot resolve the collation conflict between…”" class="hs-featured-image" style="width:auto !important; max-width:50%; float:left; margin:0 15px 15px 0;"> </a> </div> <p><span style="font-weight: normal;">One day you write some code on a new system, or using tables in the database you’ve never used before, and BOOM! A perfectly ordinary query blows up… what is this collation business??!</span></p> <div class="hs-featured-image-wrapper"> <a href="https://blog.iatric.com/report-writing-blog/t-sql-error-cannot-resolve-the-collation-conflict-between" title="" class="hs-featured-image-link"> <img src="https://blog.iatric.com/hubfs/social-media-images/RWS_Blog_Error_social.jpg" alt="T-SQL- Error: “Cannot resolve the collation conflict between…”" class="hs-featured-image" style="width:auto !important; max-width:50%; float:left; margin:0 15px 15px 0;"> </a> </div> <p><span style="font-weight: normal;">One day you write some code on a new system, or using tables in the database you’ve never used before, and BOOM! A perfectly ordinary query blows up… what is this collation business??!</span></p> <img src="https://track.hubspot.com/__ptq.gif?a=395219&amp;k=14&amp;r=https%3A%2F%2Fblog.iatric.com%2Freport-writing-blog%2Ft-sql-error-cannot-resolve-the-collation-conflict-between&amp;bu=https%253A%252F%252Fblog.iatric.com%252Freport-writing-blog&amp;bvt=rss" alt="" width="1" height="1" style="min-height:1px!important;width:1px!important;border-width:0!important;margin-top:0!important;margin-bottom:0!important;margin-right:0!important;margin-left:0!important;padding-top:0!important;padding-bottom:0!important;padding-right:0!important;padding-left:0!important; "> Report Writing Services MEDITECH Data Repository Report Writing Tips and Tricks SSRS SQL Tue, 16 Nov 2021 13:00:00 GMT info@iatric.com (Thomas Harlan, Jim McGrath; Reporting Services Team - iatricSystems) https://blog.iatric.com/report-writing-blog/t-sql-error-cannot-resolve-the-collation-conflict-between 2021-11-16T13:00:00Z Don’t Forget lowly SourceID! https://blog.iatric.com/report-writing-blog/dont-forget-lowly-sourceid <div class="hs-featured-image-wrapper"> <a href="https://blog.iatric.com/report-writing-blog/dont-forget-lowly-sourceid" title="" class="hs-featured-image-link"> <img src="https://blog.iatric.com/hubfs/social-media-images/RWS_Blog_SourceID-social.png" alt="Don’t Forget lowly SourceID!" class="hs-featured-image" style="width:auto !important; max-width:50%; float:left; margin:0 15px 15px 0;"> </a> </div> <p><span style="font-weight: bold;">Ignore SourceID at your peril!</span></p> <p><span style="font-weight: normal;">When creating joins in a SQL query, best performance is often attained by including as many primary key columns in the JOIN predicates as possible. In Meditech’s Data Repository, the SourceID column is often overlooked, especially by SQL newbies. SourceID is the first primary key column in virtually every table in Data Repository databases and simply adding this column to your joins can improve performance dramatically. </span></p> <div class="hs-featured-image-wrapper"> <a href="https://blog.iatric.com/report-writing-blog/dont-forget-lowly-sourceid" title="" class="hs-featured-image-link"> <img src="https://blog.iatric.com/hubfs/social-media-images/RWS_Blog_SourceID-social.png" alt="Don’t Forget lowly SourceID!" class="hs-featured-image" style="width:auto !important; max-width:50%; float:left; margin:0 15px 15px 0;"> </a> </div> <p><span style="font-weight: bold;">Ignore SourceID at your peril!</span></p> <p><span style="font-weight: normal;">When creating joins in a SQL query, best performance is often attained by including as many primary key columns in the JOIN predicates as possible. In Meditech’s Data Repository, the SourceID column is often overlooked, especially by SQL newbies. SourceID is the first primary key column in virtually every table in Data Repository databases and simply adding this column to your joins can improve performance dramatically. </span></p> <img src="https://track.hubspot.com/__ptq.gif?a=395219&amp;k=14&amp;r=https%3A%2F%2Fblog.iatric.com%2Freport-writing-blog%2Fdont-forget-lowly-sourceid&amp;bu=https%253A%252F%252Fblog.iatric.com%252Freport-writing-blog&amp;bvt=rss" alt="" width="1" height="1" style="min-height:1px!important;width:1px!important;border-width:0!important;margin-top:0!important;margin-bottom:0!important;margin-right:0!important;margin-left:0!important;padding-top:0!important;padding-bottom:0!important;padding-right:0!important;padding-left:0!important; "> Report Writing Services MEDITECH Data Repository Report Writing Tips and Tricks SSRS SQL Tue, 02 Nov 2021 12:00:00 GMT info@iatric.com (Thomas Harlan, Jim McGrath; Reporting Services Team - iatricSystems) https://blog.iatric.com/report-writing-blog/dont-forget-lowly-sourceid 2021-11-02T12:00:00Z T-SQL- SQL Agent Owners and the Lotto https://blog.iatric.com/report-writing-blog/t-sql-sql-agent-owners-and-the-lotto <div class="hs-featured-image-wrapper"> <a href="https://blog.iatric.com/report-writing-blog/t-sql-sql-agent-owners-and-the-lotto" title="" class="hs-featured-image-link"> <img src="https://blog.iatric.com/hubfs/social-media-images/RWS_Blog_Lotto_social.jpg" alt="T-SQL- SQL Agent Owners and the Lotto" class="hs-featured-image" style="width:auto !important; max-width:50%; float:left; margin:0 15px 15px 0;"> </a> </div> <p><span style="font-weight: normal;">Here’s a sad scene: You’ve been creating and scheduling SQL Agent jobs for years. You’ve got database maintenance jobs set up, backups, SSIS Packages to import and export data, SQL-only jobs to build datamarts. A whole ecosystem of finely tuned, perfectly running activities … all keeping your DR in tip-top condition.</span></p> <div class="hs-featured-image-wrapper"> <a href="https://blog.iatric.com/report-writing-blog/t-sql-sql-agent-owners-and-the-lotto" title="" class="hs-featured-image-link"> <img src="https://blog.iatric.com/hubfs/social-media-images/RWS_Blog_Lotto_social.jpg" alt="T-SQL- SQL Agent Owners and the Lotto" class="hs-featured-image" style="width:auto !important; max-width:50%; float:left; margin:0 15px 15px 0;"> </a> </div> <p><span style="font-weight: normal;">Here’s a sad scene: You’ve been creating and scheduling SQL Agent jobs for years. You’ve got database maintenance jobs set up, backups, SSIS Packages to import and export data, SQL-only jobs to build datamarts. A whole ecosystem of finely tuned, perfectly running activities … all keeping your DR in tip-top condition.</span></p> <img src="https://track.hubspot.com/__ptq.gif?a=395219&amp;k=14&amp;r=https%3A%2F%2Fblog.iatric.com%2Freport-writing-blog%2Ft-sql-sql-agent-owners-and-the-lotto&amp;bu=https%253A%252F%252Fblog.iatric.com%252Freport-writing-blog&amp;bvt=rss" alt="" width="1" height="1" style="min-height:1px!important;width:1px!important;border-width:0!important;margin-top:0!important;margin-bottom:0!important;margin-right:0!important;margin-left:0!important;padding-top:0!important;padding-bottom:0!important;padding-right:0!important;padding-left:0!important; "> Report Writing Services MEDITECH Data Repository Report Writing Tips and Tricks SSRS SQL Mon, 26 Jul 2021 11:00:00 GMT info@iatric.com (Thomas Harlan, Reporting Services Team - iatricSystems) https://blog.iatric.com/report-writing-blog/t-sql-sql-agent-owners-and-the-lotto 2021-07-26T11:00:00Z T-SQL- Dropping SQL Objects Cleanly https://blog.iatric.com/report-writing-blog/t-sql-dropping-sql-objects-cleanly <div class="hs-featured-image-wrapper"> <a href="https://blog.iatric.com/report-writing-blog/t-sql-dropping-sql-objects-cleanly" title="" class="hs-featured-image-link"> <img src="https://blog.iatric.com/hubfs/BlogHeaders/RWS_Blog_Temp.png" alt="T-SQL- Dropping SQL Objects Cleanly" class="hs-featured-image" style="width:auto !important; max-width:50%; float:left; margin:0 15px 15px 0;"> </a> </div> <p><span style="color: black;">For today's blog post, we want to help solve this common problem: how to&nbsp;<strong>clean up custom objects like #Temp or ##Temp tables in a SQL database when they are no longer needed.</strong></span></p> <p style="font-weight: bold;">Introduction</p> <p><span style="font-weight: normal;">As we create custom objects in a SQL database like the DR, we need to be mindful of cleaning them up when they are no longer needed, or when we need to clear an old object out, before re-creating it.</span></p> <div class="hs-featured-image-wrapper"> <a href="https://blog.iatric.com/report-writing-blog/t-sql-dropping-sql-objects-cleanly" title="" class="hs-featured-image-link"> <img src="https://blog.iatric.com/hubfs/BlogHeaders/RWS_Blog_Temp.png" alt="T-SQL- Dropping SQL Objects Cleanly" class="hs-featured-image" style="width:auto !important; max-width:50%; float:left; margin:0 15px 15px 0;"> </a> </div> <p><span style="color: black;">For today's blog post, we want to help solve this common problem: how to&nbsp;<strong>clean up custom objects like #Temp or ##Temp tables in a SQL database when they are no longer needed.</strong></span></p> <p style="font-weight: bold;">Introduction</p> <p><span style="font-weight: normal;">As we create custom objects in a SQL database like the DR, we need to be mindful of cleaning them up when they are no longer needed, or when we need to clear an old object out, before re-creating it.</span></p> <img src="https://track.hubspot.com/__ptq.gif?a=395219&amp;k=14&amp;r=https%3A%2F%2Fblog.iatric.com%2Freport-writing-blog%2Ft-sql-dropping-sql-objects-cleanly&amp;bu=https%253A%252F%252Fblog.iatric.com%252Freport-writing-blog&amp;bvt=rss" alt="" width="1" height="1" style="min-height:1px!important;width:1px!important;border-width:0!important;margin-top:0!important;margin-bottom:0!important;margin-right:0!important;margin-left:0!important;padding-top:0!important;padding-bottom:0!important;padding-right:0!important;padding-left:0!important; "> Report Writing Services MEDITECH Data Repository Report Writing Tips and Tricks SSRS SQL Mon, 12 Jul 2021 11:00:00 GMT info@iatric.com (Thomas Harlan, Reporting Services Team - iatricSystems) https://blog.iatric.com/report-writing-blog/t-sql-dropping-sql-objects-cleanly 2021-07-12T11:00:00Z SSRS: Limit the number of columns on a matrix https://blog.iatric.com/report-writing-blog/ssrs-limit-the-number-of-columns-on-a-matrix <div class="hs-featured-image-wrapper"> <a href="https://blog.iatric.com/report-writing-blog/ssrs-limit-the-number-of-columns-on-a-matrix" title="" class="hs-featured-image-link"> <img src="https://blog.iatric.com/hubfs/social-media-images/RWS_Blog_SSRS%20%282%29.jpg" alt="SSRS: Limit the number of columns on a matrix" class="hs-featured-image" style="width:auto !important; max-width:50%; float:left; margin:0 15px 15px 0;"> </a> </div> <p><span style="font-weight: normal;">For today's blog post, we want to help solve this common p</span>roblem: how to <span style="font-weight: bold;">limit the number of columns in a matrix to prevent it from exceeding the page width, when there may be any number of columns.</span></p> <p>The following information is based on <a href="https://social.msdn.microsoft.com/Forums/sqlserver/en-US/32f28407-e1ca-457e-92fd-d292e32dde4e/limit-no-of-columns-in-ssrs-matrix-report?forum=sqlreportingservices">Limit no of columns in SSRS matrix report</a> By Challen Fu, Microsoft.</p> <div class="hs-featured-image-wrapper"> <a href="https://blog.iatric.com/report-writing-blog/ssrs-limit-the-number-of-columns-on-a-matrix" title="" class="hs-featured-image-link"> <img src="https://blog.iatric.com/hubfs/social-media-images/RWS_Blog_SSRS%20%282%29.jpg" alt="SSRS: Limit the number of columns on a matrix" class="hs-featured-image" style="width:auto !important; max-width:50%; float:left; margin:0 15px 15px 0;"> </a> </div> <p><span style="font-weight: normal;">For today's blog post, we want to help solve this common p</span>roblem: how to <span style="font-weight: bold;">limit the number of columns in a matrix to prevent it from exceeding the page width, when there may be any number of columns.</span></p> <p>The following information is based on <a href="https://social.msdn.microsoft.com/Forums/sqlserver/en-US/32f28407-e1ca-457e-92fd-d292e32dde4e/limit-no-of-columns-in-ssrs-matrix-report?forum=sqlreportingservices">Limit no of columns in SSRS matrix report</a> By Challen Fu, Microsoft.</p> <img src="https://track.hubspot.com/__ptq.gif?a=395219&amp;k=14&amp;r=https%3A%2F%2Fblog.iatric.com%2Freport-writing-blog%2Fssrs-limit-the-number-of-columns-on-a-matrix&amp;bu=https%253A%252F%252Fblog.iatric.com%252Freport-writing-blog&amp;bvt=rss" alt="" width="1" height="1" style="min-height:1px!important;width:1px!important;border-width:0!important;margin-top:0!important;margin-bottom:0!important;margin-right:0!important;margin-left:0!important;padding-top:0!important;padding-bottom:0!important;padding-right:0!important;padding-left:0!important; "> Report Writing Services MEDITECH Data Repository Report Writing Tips and Tricks SSRS SQL Tue, 29 Jun 2021 11:00:00 GMT info@iatric.com (Thomas Harlan, Jim McGrath; Reporting Services Team - iatricSystems) https://blog.iatric.com/report-writing-blog/ssrs-limit-the-number-of-columns-on-a-matrix 2021-06-29T11:00:00Z T-SQL + MEDITECH DR – Patient Location at a Point in Time https://blog.iatric.com/report-writing-blog/t-sql-meditech-dr-patient-location-at-a-point-in-time <div class="hs-featured-image-wrapper"> <a href="https://blog.iatric.com/report-writing-blog/t-sql-meditech-dr-patient-location-at-a-point-in-time" title="" class="hs-featured-image-link"> <img src="https://blog.iatric.com/hubfs/BlogHeaders/Patient%20Location%20-%20Blog%20Header.jpg" alt="T-SQL + MEDITECH DR – Patient Location at a Point in Time image" class="hs-featured-image" style="width:auto !important; max-width:50%; float:left; margin:0 15px 15px 0;"> </a> </div> <p>There is lots of data stored in MEDITECH data, but invariably you are going to encounter that <em>one bit of data</em> that you need, that is not helpfully stored in the tables you are using.</p> <div class="hs-featured-image-wrapper"> <a href="https://blog.iatric.com/report-writing-blog/t-sql-meditech-dr-patient-location-at-a-point-in-time" title="" class="hs-featured-image-link"> <img src="https://blog.iatric.com/hubfs/BlogHeaders/Patient%20Location%20-%20Blog%20Header.jpg" alt="T-SQL + MEDITECH DR – Patient Location at a Point in Time image" class="hs-featured-image" style="width:auto !important; max-width:50%; float:left; margin:0 15px 15px 0;"> </a> </div> <p>There is lots of data stored in MEDITECH data, but invariably you are going to encounter that <em>one bit of data</em> that you need, that is not helpfully stored in the tables you are using.</p> <img src="https://track.hubspot.com/__ptq.gif?a=395219&amp;k=14&amp;r=https%3A%2F%2Fblog.iatric.com%2Freport-writing-blog%2Ft-sql-meditech-dr-patient-location-at-a-point-in-time&amp;bu=https%253A%252F%252Fblog.iatric.com%252Freport-writing-blog&amp;bvt=rss" alt="" width="1" height="1" style="min-height:1px!important;width:1px!important;border-width:0!important;margin-top:0!important;margin-bottom:0!important;margin-right:0!important;margin-left:0!important;padding-top:0!important;padding-bottom:0!important;padding-right:0!important;padding-left:0!important; "> Report Writing Services MEDITECH Data Repository Report Writing Tips and Tricks SSRS SQL Wed, 30 Dec 2020 13:00:00 GMT info@iatric.com (Thomas Harlan, Reporting Services Team - iatricSystems) https://blog.iatric.com/report-writing-blog/t-sql-meditech-dr-patient-location-at-a-point-in-time 2020-12-30T13:00:00Z T-SQL- Reducing Log Usage with a Looped DELETE https://blog.iatric.com/report-writing-blog/t-sql-reducing-log-usage-with-a-looped-delete <div class="hs-featured-image-wrapper"> <a href="https://blog.iatric.com/report-writing-blog/t-sql-reducing-log-usage-with-a-looped-delete" title="" class="hs-featured-image-link"> <img src="https://blog.iatric.com/hubfs/BlogHeaders/Looped%20Delete%20-%20Blog%20Header.jpg" alt="T-SQL- Reducing Log Usage with a Looped DELETE image" class="hs-featured-image" style="width:auto !important; max-width:50%; float:left; margin:0 15px 15px 0;"> </a> </div> <p>As we go through our daily lives of reporting and analyzing data, we use <a href="https://docs.microsoft.com/en-US/sql/t-sql/queries/select-transact-sql?view=sql-server-ver15">SELECT</a> constantly. It’s like breathing after a while… and while we might be keeping an eye on the performance of our queries, so that we don’t use unnecessary system resources, they <span style="font-style: italic;">generally</span> don’t crash out on a resource constraint issue and interrupt other processes. SQL Server is good at managing them.</p> <div class="hs-featured-image-wrapper"> <a href="https://blog.iatric.com/report-writing-blog/t-sql-reducing-log-usage-with-a-looped-delete" title="" class="hs-featured-image-link"> <img src="https://blog.iatric.com/hubfs/BlogHeaders/Looped%20Delete%20-%20Blog%20Header.jpg" alt="T-SQL- Reducing Log Usage with a Looped DELETE image" class="hs-featured-image" style="width:auto !important; max-width:50%; float:left; margin:0 15px 15px 0;"> </a> </div> <p>As we go through our daily lives of reporting and analyzing data, we use <a href="https://docs.microsoft.com/en-US/sql/t-sql/queries/select-transact-sql?view=sql-server-ver15">SELECT</a> constantly. It’s like breathing after a while… and while we might be keeping an eye on the performance of our queries, so that we don’t use unnecessary system resources, they <span style="font-style: italic;">generally</span> don’t crash out on a resource constraint issue and interrupt other processes. SQL Server is good at managing them.</p> <img src="https://track.hubspot.com/__ptq.gif?a=395219&amp;k=14&amp;r=https%3A%2F%2Fblog.iatric.com%2Freport-writing-blog%2Ft-sql-reducing-log-usage-with-a-looped-delete&amp;bu=https%253A%252F%252Fblog.iatric.com%252Freport-writing-blog&amp;bvt=rss" alt="" width="1" height="1" style="min-height:1px!important;width:1px!important;border-width:0!important;margin-top:0!important;margin-bottom:0!important;margin-right:0!important;margin-left:0!important;padding-top:0!important;padding-bottom:0!important;padding-right:0!important;padding-left:0!important; "> Report Writing Services MEDITECH Data Repository Report Writing Tips and Tricks SSRS SQL Fri, 18 Dec 2020 11:29:16 GMT info@iatric.com (Thomas Harlan, Reporting Services Team - iatricSystems) https://blog.iatric.com/report-writing-blog/t-sql-reducing-log-usage-with-a-looped-delete 2020-12-18T11:29:16Z T-SQL- Using Linked Server Data https://blog.iatric.com/report-writing-blog/t-sql-using-linked-server-data <div class="hs-featured-image-wrapper"> <a href="https://blog.iatric.com/report-writing-blog/t-sql-using-linked-server-data" title="" class="hs-featured-image-link"> <img src="https://blog.iatric.com/hubfs/BlogHeaders/Using%20Linked%20Server%20Data%20Blog%20Header.jpg" alt="T-SQL- Using Linked Server Data image" class="hs-featured-image" style="width:auto !important; max-width:50%; float:left; margin:0 15px 15px 0;"> </a> </div> <p>In a modern hospital environment, you inevitably have multiple applications holding disparate sets of data. But that data is often related to the data in other systems, and sooner or later (generally sooner) someone is going to ask you something like:</p> <div class="hs-featured-image-wrapper"> <a href="https://blog.iatric.com/report-writing-blog/t-sql-using-linked-server-data" title="" class="hs-featured-image-link"> <img src="https://blog.iatric.com/hubfs/BlogHeaders/Using%20Linked%20Server%20Data%20Blog%20Header.jpg" alt="T-SQL- Using Linked Server Data image" class="hs-featured-image" style="width:auto !important; max-width:50%; float:left; margin:0 15px 15px 0;"> </a> </div> <p>In a modern hospital environment, you inevitably have multiple applications holding disparate sets of data. But that data is often related to the data in other systems, and sooner or later (generally sooner) someone is going to ask you something like:</p> <img src="https://track.hubspot.com/__ptq.gif?a=395219&amp;k=14&amp;r=https%3A%2F%2Fblog.iatric.com%2Freport-writing-blog%2Ft-sql-using-linked-server-data&amp;bu=https%253A%252F%252Fblog.iatric.com%252Freport-writing-blog&amp;bvt=rss" alt="" width="1" height="1" style="min-height:1px!important;width:1px!important;border-width:0!important;margin-top:0!important;margin-bottom:0!important;margin-right:0!important;margin-left:0!important;padding-top:0!important;padding-bottom:0!important;padding-right:0!important;padding-left:0!important; "> Report Writing Services MEDITECH Data Repository Report Writing Tips and Tricks SSRS SQL Fri, 04 Dec 2020 12:00:00 GMT info@iatric.com (Thomas Harlan, Reporting Services Team - iatricSystems) https://blog.iatric.com/report-writing-blog/t-sql-using-linked-server-data 2020-12-04T12:00:00Z T-SQL- Reformatting bulk text into a table of lines https://blog.iatric.com/report-writing-blog/t-sql-reformatting-bulk-text-into-a-table-of-lines <div class="hs-featured-image-wrapper"> <a href="https://blog.iatric.com/report-writing-blog/t-sql-reformatting-bulk-text-into-a-table-of-lines" title="" class="hs-featured-image-link"> <img src="https://blog.iatric.com/hubfs/BlogHeaders/TSQL%20Reformatting%20-%20Blog%20Header.jpg" alt="T-SQL- Reformatting bulk text into a table of lines image" class="hs-featured-image" style="width:auto !important; max-width:50%; float:left; margin:0 15px 15px 0;"> </a> </div> <p>MEDITECH stores a lot of bulk text in the DR; usually as a sequenced table of lines, with some line length. That text may or may not be formatted with extra characters to control fonts and bold/italic/etc.</p> <div class="hs-featured-image-wrapper"> <a href="https://blog.iatric.com/report-writing-blog/t-sql-reformatting-bulk-text-into-a-table-of-lines" title="" class="hs-featured-image-link"> <img src="https://blog.iatric.com/hubfs/BlogHeaders/TSQL%20Reformatting%20-%20Blog%20Header.jpg" alt="T-SQL- Reformatting bulk text into a table of lines image" class="hs-featured-image" style="width:auto !important; max-width:50%; float:left; margin:0 15px 15px 0;"> </a> </div> <p>MEDITECH stores a lot of bulk text in the DR; usually as a sequenced table of lines, with some line length. That text may or may not be formatted with extra characters to control fonts and bold/italic/etc.</p> <img src="https://track.hubspot.com/__ptq.gif?a=395219&amp;k=14&amp;r=https%3A%2F%2Fblog.iatric.com%2Freport-writing-blog%2Ft-sql-reformatting-bulk-text-into-a-table-of-lines&amp;bu=https%253A%252F%252Fblog.iatric.com%252Freport-writing-blog&amp;bvt=rss" alt="" width="1" height="1" style="min-height:1px!important;width:1px!important;border-width:0!important;margin-top:0!important;margin-bottom:0!important;margin-right:0!important;margin-left:0!important;padding-top:0!important;padding-bottom:0!important;padding-right:0!important;padding-left:0!important; "> Report Writing Services MEDITECH Data Repository Report Writing Tips and Tricks SSRS SQL Tue, 24 Nov 2020 12:00:00 GMT info@iatric.com (Thomas Harlan, Jim McGrath; Reporting Services Team - iatricSystems) https://blog.iatric.com/report-writing-blog/t-sql-reformatting-bulk-text-into-a-table-of-lines 2020-11-24T12:00:00Z