Viewing 15 posts - 331 through 345 (of 2,648 total)
Set up test data
set statistics io, time off
DROP TABLE IF EXISTS dbo.PATIENTS;
CREATE TABLE dbo.PATIENTS
(
FIRST_NAME varchar(50),
...
July 14, 2023 at 12:58 am
Ah... I see my confusion here. The op posted a recursive CTE where he said it wouldn't work with the word RECURSIVE and Frederico said that RECURSIVE is not...
July 10, 2023 at 9:13 pm
I think you might want a recursive common table expression.
Something like this:
DECLARE @n int = 3;
WITH Factorial(F,n) AS
(
SELECT 1 ...
July 10, 2023 at 8:57 pm
I think you might want a recursive common table expression.
Something like this:
DECLARE @n int = 3;
WITH Factorial(F,n) AS
(
SELECT 1 ...
July 10, 2023 at 3:10 pm
You could do with reading this: How to post code problems
DROP TABLE IF EXISTS dbo.PATIENTS;
CREATE TABLE dbo.PATIENTS
(
FIRST_NAME ...
July 5, 2023 at 9:33 pm
If you use:
SET STATISTICS IO, TIME ON
you will also get the CPU usage for the query.
July 5, 2023 at 9:10 am
I think the following index should help performance:
CREATE INDEX IX_OptionsEOD_1
ON dbo.OptionsEOD (UNDERLYING_SYMBOL, ROOT_SYMBOL, EXPIRATION, STRIKE, OPTION_TYPE, QUOTE_DATE)
INCLUDE (CLOSE_PRICE)
;
July 3, 2023 at 5:10 pm
To increase the performance you could limit the rows the query in the CTE produces by selecting on the QUOTE_DATE going back a given amount of days to when you...
July 3, 2023 at 3:08 pm
Another option:
WITH CTE AS
(
SELECT T1.UNDERLYING_SYMBOL,
T1.QUOTE_DATE,
...
July 3, 2023 at 2:28 pm
SELECT T1.UNDERLYING_SYMBOL,
T1.QUOTE_DATE,
T1.ROOT_SYMBOL,
T1.EXPIRATION,
...
July 3, 2023 at 1:41 pm
Yes you can, I've upgraded from SQL 2012 to 2019 by just restoring a backup.
July 3, 2023 at 11:24 am
DECLARE @YearKey int,
@WeekKey int, @CA4 int,
@PrevMonthCheck int= -1,
...
July 1, 2023 at 5:02 pm
You are getting the new error because ProjectedValue / StartValue is less than 1 (3.22/4.079).
When you raise this to a number greater than 1 (182.5) you get a number very...
June 30, 2023 at 9:53 pm
The overflow occurs because the exponent in the POWER function is extremely large due to the short time span and high growth rate.
The formula isn't designed to handle cases of...
June 30, 2023 at 8:53 pm
The expressions you mentioned, such as BETWEEN, EXISTS, IN, LIKE, <, >, =, and others, are often referred to as operators or comparison operators rather than predicates.
In logic, predicates typically...
June 29, 2023 at 10:05 pm
Viewing 15 posts - 331 through 345 (of 2,648 total)