Viewing 15 posts - 2,776 through 2,790 (of 10,143 total)
IMHO the option "Neither" is correct, because MERGE is likely to outperform options 1 and 2, both of which require a test in some or all cases. Since the poster...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 26, 2014 at 2:20 am
Eirikur Eiriksson (11/26/2014)
😎
SELECT
CASE
...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 26, 2014 at 1:38 am
Evil Kraig F (11/24/2014)
Jeff Moden (11/24/2014)
Eirikur Eiriksson (11/24/2014)
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 25, 2014 at 6:45 am
sgmunson (11/21/2014)
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 21, 2014 at 7:37 am
Thanks Serg, my bad:
SELECT a.id
,T1.F.value('(//Node1)[1]', 'varchar(100)') x
--,T2.F.value('(//Node2)[1]', 'varchar(100)') y
FROM #Table1 AS a
CROSS APPLY a.data.nodes('//Node1') AS T1(F) -- part 1
LEFT JOIN #Table1 b
CROSS APPLY a.data.nodes('//Node2') AS T2(F) -- part 2
ON...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 21, 2014 at 7:02 am
The restrictions of the FLOAT datatype are specified here. The numbers you've posted look ok, however I'd recommend you check your data for elements which may be out of range.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 21, 2014 at 6:00 am
If you look again at the original query:
...
FROM
Table1 AS a
CROSS APPLY data.nodes('.../Node1') AS T1(F) -- part 1
LEFT JOIN Table1 AS b
CROSS APPLY data.nodes('.../Node2') AS T2(F)...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 21, 2014 at 4:35 am
manifbest (11/20/2014)
I want to find out the standard deviation from the following value but it gives me error because i am using STDEV function from the MSSQL.
My...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 20, 2014 at 5:56 am
sgmunson (11/19/2014)
ChrisM@Work (11/19/2014)
Steve - (F) is a column name assignment:
SELECT * FROM (SELECT 1) d (ColumnName)
Ahhh, ... ok... I try really hard NOT to use that kind of...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 19, 2014 at 7:14 am
Steve - (F) is a column name assignment:
SELECT * FROM (SELECT 1) d (ColumnName)
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 19, 2014 at 6:43 am
Ashish Dutt (11/18/2014)
...Is there any other way of accomplishing this task in lesser amount of query execution time?Please suggest. Eagerly awaiting your conducive response.
Yes there is. You mentioned that two...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 19, 2014 at 2:10 am
Stored procedures marked to run on startup:
SELECT [name] FROM master.dbo.sysobjects WHERE type = 'P' AND OBJECTPROPERTY(id, 'ExecIsStartUp') = 1;
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 18, 2014 at 8:28 am
That's horrible code. A cursor loop is much the same as a while loop, you won't gain anything by changing your existing loop into a different one. What you really...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 18, 2014 at 6:22 am
Complex queries run the risk of failing to obtain a satisfactory execution plan, as the optimiser doesn't have sufficient time to explore all possibilities. You'll get a plan so the...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 14, 2014 at 7:25 am
-- day 0 ('19000101') is a monday
SELECT DATENAME(dw,cast('19000101' as date)) -- monday
SELECT DATEDIFF(day,0,GETDATE()) -- 41952 (tuesday 11th November)
SELECT 41952 % 7 -- = 1 for today (tuesday)
SELECT 41951 % 7...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 11, 2014 at 6:22 am
Viewing 15 posts - 2,776 through 2,790 (of 10,143 total)