Viewing 15 posts - 1,696 through 1,710 (of 4,087 total)
When working with date ranges, it's best if everything is expressed as dates. If you are going to use integers or strings to represent (partial) dates, they should be in...
May 16, 2017 at 1:16 pm
There are a couple of approaches that could be used, which one is best depends on how big any gaps in your numbers could be. Also, your ranges are not...
May 15, 2017 at 4:37 pm
May 15, 2017 at 10:17 am
May 13, 2017 at 1:00 pm
This works best if you have a calendar table. I've created a CTE calendar table to demonstrate how it would work.
I used LEAD to find the ranges for...
May 13, 2017 at 12:54 pm
May 13, 2017 at 12:31 pm
However daily totals values of two tables...
May 13, 2017 at 12:27 pm
This works, but it's not pretty. I think that it can be better written.
CREATE TABLE #Test(ID TINYINT, BadData varchar(100));
GO
INSERT INTO #Test(ID, BadData) VALUES
(1,...
May 13, 2017 at 12:20 pm
2. BETWEEN is evil.
May 12, 2017 at 8:12 am
The values for the system time can only be literals or variables. They cannot be date/time fields.
<system_time> ::=
May 11, 2017 at 11:15 am
Had an interview this morning that went so well, they decided to skip the in-person interview and just offered me the job. 😀
Drew
May 5, 2017 at 3:57 pm
May 4, 2017 at 12:46 pm
I like a third-party tool called Beyond Compare (using the table mode).
Another option is something likeSELECT *
FROM dbo.TEST5_H H
INNER JOIN dbo.TEST5_H2 H2
ON...
May 4, 2017 at 12:36 pm
Viewing 15 posts - 1,696 through 1,710 (of 4,087 total)