Viewing 15 posts - 2,356 through 2,370 (of 7,191 total)
Chris, yes, that's very similar to mine now.CPU Elapsed
--- -------
4303 1185
4260 1184
4273 1255
John
August 11, 2016 at 8:05 am
SQL Server 2014, four processors, 16GB RAM. Test harness:USE tempdb
CREATE TABLE Dates (MyDate datetime);
WITH N10(n) AS (
SELECT CAST(n AS bigint) FROM (VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9))m(n)
)
, N100 AS (
SELECT m1.n FROM...
August 11, 2016 at 5:45 am
Edvard
If you add one day to the last day of the month, you get the first day of the next month. You could therefore try something like this:
WHERE DATEPART(day,DATEADD(day,1,Check_date))...
August 11, 2016 at 2:42 am
I agree with Jeff - no need for PowerShell. Write a view or stored procedure, and create a job to e-mail the results.
I don't share Jeff's doubt over whether...
August 10, 2016 at 8:20 am
Do you still get the error if you try to remove the user like this? USE SSISDB
DROP USER USERNAME
John
August 9, 2016 at 2:52 am
You have replaced "USERNAME" in that query with the name of the login you can't drop, haven't you? And you are running the query in the correct database context...
August 9, 2016 at 2:09 am
Do StartDate and EndDate always straddle a month boundary, and if so do they always straddle exactly one? Is the Amount to be divided evenly between the months regardless...
August 8, 2016 at 4:47 am
Or dust off your school maths book and use logarithms!WITH Logs AS (
SELECT
PropertyID
,TimePeriodDate
,MIN(Rent) OVER (PARTITION BY PropertyID) AS StartRent
,Growth
,SUM(LOG(Growth)) OVER (
PARTITION BY PropertyID
ORDER BY TimePeriodDate
ROWS BETWEEN UNBOUNDED PRECEDING AND 1...
August 5, 2016 at 5:50 am
Yes, it is usually a good idea to have a clustered index on your tables. If you're doing a lot of inserts, make sure the key is monotonically increasing...
August 5, 2016 at 4:16 am
WhiteLotus (8/3/2016)
The application behaves abnormally these day
What do you mean by this? Has the application's behaviour changed, and if so in what way? Did anything change in...
August 5, 2016 at 4:01 am
The first INSERT statement can't work, nested or not, because the ID and date columns in the temp table are not nullable and you haven't specified values for them. ...
August 5, 2016 at 3:52 am
Or maybe you've just done something that drags a lot of data pages in and out of memory, such as index maintenance or a data load?
John
August 5, 2016 at 3:09 am
You're trying to insert from the dim_person.person_name column, which is (presumably) nvarchar into the person_Ext column in your temp table, which is int.
John
August 4, 2016 at 8:45 am
All I've done here in addition to what I posted before is calculate the previous start and end dates based on the given start and end dates. You could...
August 4, 2016 at 5:36 am
Twice as much space as you need for all your indexes - is that a big problem? What is the autogrowth increment for the log file? Was there...
August 4, 2016 at 4:54 am
Viewing 15 posts - 2,356 through 2,370 (of 7,191 total)