Reputation
232
Top tag
Next privilege 250 Rep.
View close votes
Badges
1 10
Impact
~5k people reached

  • 0 posts edited
  • 0 helpful flags
  • 7 votes cast
Mar
9
accepted Converting date string to SQL DATETIME - hopefully without a udf
Mar
9
comment Converting date string to SQL DATETIME - hopefully without a udf
@AaronBertrand the date column in the file has various different formats and the guy that owns the file claims that he rather not change it because all his historical files are in the same format and he wants to be able to compare these dates in the future. I politely asked him to please add a new column with the dates in ISO8601 format but he claimed that it was too difficult to add more columns. Funny thing is that 15 secs later he offered to add a GUID column to the same file. It's sad and funny at the same time. This is CSV file produced by a Perl script.
Mar
9
asked Converting date string to SQL DATETIME - hopefully without a udf
Feb
2
awarded  Popular Question
Oct
19
awarded  Curious
Oct
14
awarded  Yearling
Sep
24
awarded  Autobiographer
Jan
16
awarded  Commentator
Jan
16
accepted Raise error from Stored PROC in SQL Server PDW
Jan
16
comment Raise error from Stored PROC in SQL Server PDW
This is an awesome hack and I am prepared to live with it. I will accept your answer. Thanks!
Jan
16
asked Raise error from Stored PROC in SQL Server PDW
Sep
12
accepted Constructing datetime from 2 fields: one integer and a datetime
Sep
12
comment Constructing datetime from 2 fields: one integer and a datetime
thank you for your answer.
Sep
12
comment Constructing datetime from 2 fields: one integer and a datetime
@JonSeigel Getting rid of TryParseExact and using ParseExact only reduced the execution time by 1 sec (5 secs). Still slower than the T-SQL approach.
Sep
12
comment Constructing datetime from 2 fields: one integer and a datetime
@JonSeigel I created a SQL CLR Function to test on my DEV environment (used DateTime.TryParseExact) and on 100K rows sample, performs twice slower than my T-SQL version (3s Vs 6 secs).
Sep
12
comment Constructing datetime from 2 fields: one integer and a datetime
@JonSeigel CLR integration is not enabled, unfortunately. I thought about that possibility too.
Sep
12
comment Constructing datetime from 2 fields: one integer and a datetime
@AaronBertrand Refund? That person(s) needs to pay for damages... Seriously though, the saddest part is that it was likely a decision made by either the "chief software architect" or worse, a group of senior developers. In any case, I don't want to know... :-/
Sep
12
revised Constructing datetime from 2 fields: one integer and a datetime
added 2 characters in body
Sep
12
comment Constructing datetime from 2 fields: one integer and a datetime
@AaronBertrand That is not a possibility. The database has billions of rows of trading data and several apps (matching and routing engines) write to the database using an int to represent the time of the day :-/
Sep
12
asked Constructing datetime from 2 fields: one integer and a datetime