Viewing 15 posts - 361 through 375 (of 1,491 total)
WITH Rules
AS
(
SELECT id, [value]
,CASE
WHEN 10 = SUM(CASE WHEN [value] >= 1000 THEN 1 ELSE 0 END)
OVER (ORDER BY id ROWS BETWEEN CURRENT ROW AND 9 FOLLOWING)
THEN 1
ELSE...
January 17, 2022 at 3:33 pm
I presume you want to know why, when running under the DP300User1 context, the SP works but the query on it's own does not.
When a SP is created by default...
January 13, 2022 at 12:56 pm
USE [master];
GO
CREATE DATABASE YourDB
ON
(FILENAME = N'D:\YourPath\DB_1.mdf')
,(FILENAME = N'D:\YourPath\DB_1.ldf')
FOR ATTACH;
GO
January 12, 2022 at 7:29 pm
I found this article interesting not so much for Query Control but for the possibilities offered by the Gallium Data db proxy.
Do you think it would be possible to point...
January 8, 2022 at 2:31 pm
I am glad it helped but you will need to test it very carefully before it goes near production. You should especially try to think of every boundary condition and...
December 6, 2021 at 8:56 pm
It might be more efficient to avoid joins:
WITH Grps
AS
(
--Use ShiftEnd as the group as the value will be needed anyway.
...
December 6, 2021 at 3:04 pm
This looks like ROW_NUMBER() combined with a simple JOIN.
If you show what you have tried someone may help you.
December 6, 2021 at 8:21 am
Also, you do not want to be running anything which requires user interaction from the agent. eg pause, notepad etc.
ie The agent is running as its own process on the...
November 29, 2021 at 1:44 pm
I have never used powershell with MS Access but I would be inclined to use Export-Csv which has -NoTypeInformation and -Delimiter parameters.
November 4, 2021 at 9:07 pm
If you are planning for large amounts of data you might be interested in some 'light' reading:
https://www.itprotoday.com/sql-server/interval-queries-sql-server
November 2, 2021 at 2:22 pm
1. Jeff recommends always using an anchor and I am not sure that @PrevDate counts.
2. It seems there can sometimes be problems with the 3 part update so it might...
October 25, 2021 at 4:39 pm
As usage and result are dependent on previous calculations, which in turn are dependent on the previous calculations, windowed functions will not work. I would be inclined to use a...
October 24, 2021 at 9:28 pm
CTEs work differently in Oracle and SQL. In SQL Server they have to be declared first but more can be done with them. eg
WITH earliest_wlgmt_events
AS
(
SELECT m.legal_case_id AS...
October 7, 2021 at 11:31 am
You might be able to do it via a stored procedure.
https://www.sqlservercentral.com/forums/topic/signing-a-stored-procedure-that-uses-a-linked-server
October 5, 2021 at 2:50 pm
Viewing 15 posts - 361 through 375 (of 1,491 total)