Viewing 15 posts - 3,061 through 3,075 (of 10,143 total)
That's a bit rubbish isn't it. Try this if you get the opportunity. It's only a select, no update:
DECLARE @tsql VARCHAR(8000)
SET @tsql = '
SELECT
E.UCELL_ID As LocalCellID
,RNC As RNC
,Cast( Cast(YEAR_ID...
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
August 1, 2014 at 5:12 am
shashikantnist (7/31/2014)
In the Given Query a new column will create at run time with name EmailNumber and that number will update the variable where the SET statement have been used.
What...
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
August 1, 2014 at 1:42 am
stevenb 63624 (7/31/2014)
SELECT *
FROM (
SELECT id
,rowid
,value
,readingdate
,ROW_NUMBER() OVER (
PARTITION BY id
,datepart(hh, readingdate)
,CASE
WHEN datepart(n, readingdate) <= 30
THEN 0
ELSE 1
END ORDER BY id ASC
,readingdate DESC
) PartID
FROM #tempreadings
) a
WHERE partid...
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
July 31, 2014 at 7:23 am
Koen Verbeeck (7/31/2014)
Lynn Pettis (7/31/2014)
Lynn Pettis (7/31/2014)
SQLRNNR (7/30/2014)
Lynn Pettis (7/30/2014)
Really?? Let's put a 500 million row table into an in-memory table.
It could work - depending on what the data is...
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
July 31, 2014 at 7:00 am
WITH DistinctDays AS (
SELECT DISTINCT ID, ReadingdateDT = CAST(CAST(Readingdate AS DATE) AS DATETIME)
FROM #tempreadings
)
SELECT *
FROM DistinctDays d
CROSS APPLY (
SELECT Timeslot = DATEADD(minute,n*30,ReadingdateDT)
...
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
July 31, 2014 at 6:55 am
mallikachowdhary 98955 (7/29/2014)
I would like to share a new learning I made today , earlier when I was trying to run the query with...
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
July 31, 2014 at 2:01 am
patrickmcginnis59 10839 (7/30/2014)
Grant Fritchey (7/30/2014)
patrickmcginnis59 10839 (7/30/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
July 30, 2014 at 9:58 am
Thanks for the feedback. Here are a couple of ways of expanding on the number of rows you have to generate:
WITH iTally (n) AS (
SELECT TOP(SELECT TOP(1) [Rows] = COUNT(*)...
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
July 30, 2014 at 6:06 am
phani.gudmines (7/29/2014)
Hi chrisseems that you are using 1,2,3,4,5 staticly.we dont know how may rows we get as described.i have just given u a sample data.
Thanks
How many rows might you...
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
July 29, 2014 at 7:40 am
Sample data setup:
DROP TABLE #Table1
CREATE TABLE #Table1 (id int, value int)
INSERT INTO #Table1 (id, value) VALUES
(1, 11),
(2, 12),
(3, 13),
(4, 14)
DROP TABLE #table2
CREATE TABLE #table2 (id1 INT, value1 INT)
INSERT INTO #table2...
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
July 29, 2014 at 7:22 am
SELECT id, value, id1, value1
FROM #Table1 t1
CROSS JOIN (SELECT TOP(SELECT TOP(1) [Rows] = COUNT(*) FROM #table2 GROUP BY id1 ORDER BY COUNT(*) DESC) n FROM (VALUES (1), (2), (3), (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
July 29, 2014 at 7:22 am
Greg Edwards-268690 (7/29/2014)
bantrim (7/29/2014)
Ed Wagner (7/29/2014)
Greg Edwards-268690 (7/29/2014)
In Minnesota, there is a pothole season too.
Plenty of time here too, although I'd venture to say someone taking in...
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
July 29, 2014 at 6:59 am
It's a procedure on the calling server. You have a few options here:
Save the query as a view on the remote server and call the view from the procedure.
Change 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
July 29, 2014 at 2:37 am
mallikachowdhary 98955 (7/26/2014)
As it is the production server I'm not allowed to make frequent changes....
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
July 29, 2014 at 2:27 am
The easiest solution would be to save the query as a view on server ENIQSQLSERVER.
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
July 29, 2014 at 2:17 am
Viewing 15 posts - 3,061 through 3,075 (of 10,143 total)