Viewing 15 posts - 3,151 through 3,165 (of 7,609 total)
I can't tell specifically what you need, but I suggest using the "standard" approach to adjust a datetime to a given boundary. For example, the code below totals by MINUTE,...
September 26, 2018 at 2:19 pm
As to the query plans for these:
SELECT A.FirstName, A.LastName, B.Location
FROM TableA A
LEFT OUTER JOIN TableB B
ON A.PersonId = B.PersonId AND B.Location = 'London'
September 21, 2018 at 9:49 am
my question - once sql is restarted all databases will come back online using same drive letter path? correct?
Yes, the E:\ paths will be the same, if...
September 21, 2018 at 9:45 am
You should also look at tablediff.exe to do that.
Yeah, being a command-line utility it's a little quirky to get used to, but I've found it works well...
September 20, 2018 at 9:45 am
Use:
-t ","
instead of:
-t "|"
September 19, 2018 at 12:49 pm
SELECT DATEADD(DAY,...
September 18, 2018 at 12:10 pm
I'm guessing the error was about conversion to int, based on your comments, but it would be nice to be sure.
If so, run a pre-audit on the source data...
September 18, 2018 at 12:01 pm
SELECT
@StartDt = DATEADD(HOUR, 6, DATEADD(DAY, DATEDIFF(DAY, 0, GETDATE()) - 1, 0)),
@EndDt = DATEADD(HOUR, 1, DATEADD(DAY, DATEDIFF(DAY, 0, GETDATE()), 0))
September 18, 2018 at 11:47 am
September 18, 2018 at 11:19 am
MERGE is notorious for some performance issues. You might want to try "UPSERT" -- an equivalent UPDATE followed by an INSERT.
For overall performance,, make sure you have...
September 17, 2018 at 3:41 pm
100% not using a JOIN clause screams "noob".
But I see many more issues.
A serious one is not including a schema name before the table names. ...
September 17, 2018 at 3:24 pm
September 17, 2018 at 3:02 pm
September 17, 2018 at 2:56 pm
September 17, 2018 at 12:36 pm
Viewing 15 posts - 3,151 through 3,165 (of 7,609 total)