SQL create a delimited string from a flat file

2020-03-04T21:21:31+00:00February 24th, 2015|SQL|

Recently I wrote a post on how to split a delimited string in SQL. Now I need to do the reverse and take the flat table and create a delimited string in SQL. Fortunately creating a delimited string in SQL is far simpler than splitting a delimited string. Assuming we have a flat table called CountryUsers [...]

SQL split string by a delimiter to create new rows

2020-03-05T10:12:23+00:00February 4th, 2015|SQL|

Ever need to split a delimited string in SQL, creating new records? For example you could have a table called Users: Country User UK Bob|Fred|Bill USA Mike|Lou|Carol|Sam What you want is to split the string by the delimiter and create new rows: Country User UK Bob UK Fred UK Bill USA Mike USA Lou USA [...]

Quickest way to remove the time from a datetime in SQL

2020-03-19T14:37:35+00:00November 10th, 2011|SQL|

In an earlier post I showed some ways to remove the time portion from a date. The obvious follow on from that is which is fastest. To test I ran both versions on a dataset of 1.9m rows of data. The DATE datatype returned the records in 15m 35s = 935s Getting the data using [...]

Remove a line feed / carriage return from a string

2020-05-07T10:26:59+00:00August 23rd, 2011|Access, Excel, SQL, Tableau|

This article describes how to remove the carriage returns and line feeds in SQL, Tableau, Excel and Access. If you ever have to deal with long strings of freetext it's likely you've come across random line feed and carriage returns in that text. These unwanted characters can cause multiple problems, therefore removing or replacing them [...]

Link Tableau to SSRS

2020-03-07T09:54:01+00:00June 7th, 2011|SQL, Tableau|

Use Tableau URL actions to link Tableau to SSRS, enabling users to click from Tableau to SSRS. To begin create a dashboard and put whatever graphs, etc, you want on it. Next we create a “button” for our dashboard. The URL Action will trigger from the “button” and take us to the SSRS report. Unfortunately [...]