SQL Server – Chris Coulson's Developer Notes https://blogs.visigo.com/chriscoulson Tips on .Net, SQL Server, Sharepoint & AI Thu, 06 Feb 2020 06:20:31 +0000 en-US hourly 1 https://wordpress.org/?v=6.3.5 https://blogs.visigo.com/chriscoulson/wp-content/uploads/2011/02/chris_profile-150x150.jpg SQL Server – Chris Coulson's Developer Notes https://blogs.visigo.com/chriscoulson 32 32 SQL Server Spatial Data: Finding and Ordering Distance Between 2 Points https://blogs.visigo.com/chriscoulson/sql-server-spatial-data-finding-and-ordering-distance-between-2-points/ https://blogs.visigo.com/chriscoulson/sql-server-spatial-data-finding-and-ordering-distance-between-2-points/#comments Thu, 06 Feb 2020 06:20:31 +0000 https://blogs.visigo.com/chriscoulson/?p=460 It’s pretty common to want to find the distance from a certain location to a location stored in your database. For example, in the Home Depot or Walmart website you might want to find the closest store. The locations of all of the stores will be stored in a database, and then given your location the distance to each store can be calculated and ordered by the closest stores.

Source

]]>
https://blogs.visigo.com/chriscoulson/sql-server-spatial-data-finding-and-ordering-distance-between-2-points/feed/ 1
Removing Null Characters (0x00) From Values in SQL Server https://blogs.visigo.com/chriscoulson/removing-null-characters-0x00-from-values-in-sql-server/ https://blogs.visigo.com/chriscoulson/removing-null-characters-0x00-from-values-in-sql-server/#comments Wed, 04 Jul 2012 14:17:30 +0000 http://blogs.visigo.com/chriscoulson/?p=108 I recently came across a problem while crawling a BCS data source in SharePoint 2010. Most of the 130,000 records were getting indexed, but I was getting an error on 25 records: When I first took a look at the offending records in the database I couldn’t see any actual problems. The issue was that the null character in the data was being treated as a string terminator, so it was not being returned...

Source

]]>
https://blogs.visigo.com/chriscoulson/removing-null-characters-0x00-from-values-in-sql-server/feed/ 7
Bulk Delete ASP.NET Membership Users https://blogs.visigo.com/chriscoulson/bulk-delete-asp-net-membership-users/ https://blogs.visigo.com/chriscoulson/bulk-delete-asp-net-membership-users/#comments Wed, 16 Nov 2011 02:35:19 +0000 http://blogs.visigo.com/chriscoulson/?p=85 Below is a SQL script that can be used to delete a list of users from an ASP.NET membership database. It retrieves a list of users into a temporary table and then deletes the users from all the relevant tables in the database.

Source

]]>
https://blogs.visigo.com/chriscoulson/bulk-delete-asp-net-membership-users/feed/ 2
Use JPEG’s in Reporting Services if exporting to PDF https://blogs.visigo.com/chriscoulson/use-jpeg%e2%80%99s-in-reporting-services-if-you%e2%80%99re-going-to-export-to-pdf/ https://blogs.visigo.com/chriscoulson/use-jpeg%e2%80%99s-in-reporting-services-if-you%e2%80%99re-going-to-export-to-pdf/#comments Mon, 07 Mar 2011 02:37:22 +0000 http://blogs.visigo.com/chriscoulson/?p=13 I recently made the mistake of using PNG’s for high-resolution background images in SQL Server Reporting Services (2008 R2). I wanted to use PNG’s as they were lossless, supported alpha transparency and actually generated smaller files than JPEG for the images I was using. Unfortunately I ran into these problems when exporting to PDF: SLOW export to PDF PNG exported to PDF: 17 seconds.

Source

]]>
https://blogs.visigo.com/chriscoulson/use-jpeg%e2%80%99s-in-reporting-services-if-you%e2%80%99re-going-to-export-to-pdf/feed/ 1