T-SQL query to split one record into multiple with comma delimited column data
Posted on 2015-01-21
This one is kind of confusing to explain. I have a SQL view that returns data regarding servers that were rebooted in the last 24 hours.
One of the column's data can have more than one value separated by commas. So one of the records that is returned would look like this:
LastRebooted: DomainName/UserName 01/20/2015 16:55:05, DomainName/UserName 01/20/2015 13:19:13
The LastRebooted has two different times it was rebooted.
Is there a way to split that out into two records using a SELECT query? So basically this record would return two different items in the results.
Server01, DomainName/UserName 01/20/2015 16:55:05, DomainName
Server01, DomainName/UserName 01/20/2015 13:19:13, DomainName