Do any of you awesome DBA fellows know how to remove both the Date and Time stamp from an SQL string?
For example, I have a string that has this:
"2014-04-17 15:38:53.2389 Unexpected Failure System.ServiceModel.FaultException: Unexpected Failure"
I want to remove the "2014-04-17 15:38:53.2389" and just be left with this:
"Unexpected Failure System.ServiceModel.FaultException: Unexpected Failure"
I can get it to work using SUBSTRING
SUBSTRING(CAST([stacktrace] AS NVARCHAR(500)),25 ,LEN(CAST([stacktrace] AS NVARCHAR(500)))) as stackTrace
But this isn't very elegant and could cause problems for string that don't have dates at the start.
I can find ways to remove the TimeStamp or to remove the Date, but I can't find a way to remove both.
Any help would be much appreciated.
Thanks