Viewing 15 posts - 1 through 15 (of 42 total)
?SELECT peopleId
, year([transactionDate]) AS Year
, SUM(amount) AS Revenue
FROM [BCC_DB].[dbo].[Payments]
WHERE year([transactionDate]) BETWEEN 2011 and 2018
GROUP BY [peopleId]
November 27, 2018 at 2:09 pm
First, to most directly answer your question: In nearly every case, poor database performance is the result of poorly-indexed tables. So review your database indexes. Also, I think you should...
November 27, 2018 at 8:45 am
April 16, 2018 at 8:30 am
Yes, the solution works for me. To close the loop on this:
Prior to installing SQL Server Developer 2017 on my computer, I was running computer management for my...
April 16, 2018 at 8:06 am
Curious to know if this solution worked for OP. I am having the same problem and I didn't see any resolution on this thread. My configuration is:
Windows Server...
April 16, 2018 at 7:44 am
Okay, then, the SQL geniuses here have debunked my understanding of backup models, so ignore everything after my first paragraph. 😛
June 18, 2013 at 11:06 am
The point of confusion here may be the recovery model set to "Full". When the recovery model is set to full, that means you are taking full backups, (Probably...
June 18, 2013 at 10:00 am
You could DROPCLEANBUFFERS, but I would probably not do that on a production SQL instance. Obviously, there are a lot of factors at play in a decision like that.
My...
June 18, 2013 at 9:44 am
SELECT Antibiotic
, SUM(CASE WHEN Result IN (1, 2) THEN 1 ELSE 0 END) AS Tests
, SUM(CASE WHEN Result = 2...
March 23, 2013 at 7:29 am
You appear to have a violation of normal form by storing more than one piece of data in a single column. I think, ideally, you would want a table...
March 13, 2013 at 9:36 am
Yes, that's right.
Here's a helpful instructional video on aggregation:
http://www.youtube.com/watch?v=428B57dOxcE
It might be helpful for you to take 25 minutes and watch it so you can understand aggregation.
March 13, 2013 at 8:24 am
To demonstrate this behavior:
CREATE SCHEMA testA
GO
CREATE SCHEMA testB
GO
CREATE TABLE dbo.Cities (city varchar(50))
GO
CREATE TABLE testA.Cities (city varchar(50))
GO
CREATE TABLE testB.Cities (city varchar(50))
GO
INSERT INTO dbo.Cities VALUES ('Chicago')
INSERT INTO testA.Cities VALUES ('Cairo')
INSERT INTO testB.Cities...
March 13, 2013 at 6:16 am
The behavior is different within a stored procedure.
March 12, 2013 at 2:33 pm
No, you are not necessarily returning all instances where StatusId is null, just remove the last three lines:
...UNION
SELECT * FROM Employees
WHERE StatusId IS NULL
March 12, 2013 at 1:00 pm
So... you always want null results, but if @StatusId is null, return all rows? If so, I wonder how performance here would compare:
DECLARE @maxStatus int, @minStatus int
SELECT @maxStatus=9999999, @minStatus=-9999999
IF...
March 12, 2013 at 12:50 pm
Viewing 15 posts - 1 through 15 (of 42 total)