Viewing 15 posts - 2,026 through 2,040 (of 10,143 total)
Ed Wagner (10/20/2015)
Luis Cazares (10/20/2015)
Brandie Tarvin (10/20/2015)
Ed Wagner (10/20/2015)
Alvin Ramard (10/19/2015)
ITU_dk2012 (10/19/2015)
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
October 20, 2015 at 8:16 am
sreeya (10/20/2015)
I will need to create a report on below tables.
Order Facts Table has below columns:
ID bigint...
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
October 20, 2015 at 7:53 am
Jayanth_Kurup (10/20/2015)
select dateadd(s,-1*rand()*10000000 , getdate())
How would you scale this up to a million rows?
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
October 20, 2015 at 5:14 am
Here's another way, a million random-ish datetimes between 1947 and today:
-- A million datetimes between 1947 and today:
;WITH
t1 (x) AS (SELECT * FROM (VALUES (0),(0),(0),(0),(0),(0),(0),(0),(0),(0)) d (x)),
t2 (x)...
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
October 20, 2015 at 3:51 am
Martin Stephenson (10/19/2015)
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
October 19, 2015 at 10:04 am
DECLARE @StartTime DATETIME
DECLARE @Item VARCHAR(20) = ''
SET @StartTime = GETDATE()
SELECT @Item = @Item + ','+d2.Item
FROM dbo.DelimitedSplit8K_LEAD ('Param1=3;param2=4;param4=testval;param6=11',';') d1
CROSS APPLY dbo.DelimitedSplit8K_LEAD (d1.Item, '=') d2
WHERE d2.ItemNumber = 2
ORDER BY d1.ItemNumber
SELECT...
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
October 19, 2015 at 9:43 am
Martin Stephenson (10/19/2015)
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
October 19, 2015 at 9:34 am
Alvin Ramard (10/19/2015)
Jeff Moden (10/18/2015)
Any "hybrid" DBAs...
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
October 19, 2015 at 9:30 am
mister.magoo (10/16/2015)
According to this White Paper: https://msdn.microsoft.com/en-us/library/dd535534(v=sql.100).aspx
String Summary Statistics
SQL Server...
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
October 19, 2015 at 9:13 am
Resender (10/19/2015)
Ok,the execution plan of my query & your solution ChrisM@Work
Thanks. Your tables are heaps. Clustered indexes are strongly recommended.
Does the query really return 60 odd million rows? It can't,...
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
October 19, 2015 at 7:58 am
So you have some improvement. Can you post the actual execution plan please (not a picture of it, a .sqlplan file attachment)? Cheers.
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
October 19, 2015 at 7:42 am
USE [Global_Storage]
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[stg].[Report_Global_Storage_Capacity]') AND type in (N'U'))
DROP TABLE [stg].[Report_Global_Storage_Capacity]
GO
with DatesPresent as (
SELECT
dp_year = YEAR(Date_),
dp_Month = MONTH(Date_),
FirstOfThisMonth = CAST(YEAR(Date_) AS VARCHAR(4))...
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
October 19, 2015 at 5:36 am
sharonsql2013 (10/16/2015)
I need to split the amount equally into 12 months from Jan 2015 through Dec 2015.
There is no date column in the table and the total amount has...
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
October 16, 2015 at 10:16 am
rs80 (10/16/2015)
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
October 16, 2015 at 10:07 am
Junglee_George (10/16/2015)
I need help in removing cursor in my table valued function with alternate code. Thanks in advance.
ALTER FUNCTION [dbo].[eufn_e5_eSM_SE_GetCurrentContentForContainer]
(
@containerSqlId SMALLINT,
@containerIncId INT
)
RETURNS @Results TABLE
(
itemSqlId SMALLINT,
itemIncId INT,
itemMetaTableSqlId SMALLINT,
itemMetaTableIncId INT
)
AS
BEGIN
---- Get static...
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
October 16, 2015 at 7:11 am
Viewing 15 posts - 2,026 through 2,040 (of 10,143 total)