Viewing 15 posts - 7,096 through 7,110 (of 10,143 total)
-- Slight rewrite using table aliases and IN to slim-down CASE
UPDATE c
SET Amount = CASE WHEN c.lenght IN (5, 10, 15, 30, 45, 60) THEN r.amount ELSE 5000 END
FROM...
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 8, 2010 at 5:24 am
bcsims 90437 (11/5/2010)
crookj (11/5/2010)
CirquedeSQLeil (11/5/2010)
lazylethargic
Joe
... traveling all day Tuesday to get back to work...
Did you run? 😀
Well done - completing a marathon is no mean feat.
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 5, 2010 at 10:14 am
CirquedeSQLeil (11/4/2010)
Has anybody here contemplated changing their name (besides bob err ".") for the forums? I am curious if anybody much cares about the confusion that may drive.
Not 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 5, 2010 at 7:21 am
GSquared (11/5/2010)
CirquedeSQLeil (11/4/2010)
Grant Fritchey (11/4/2010)
CirquedeSQLeil (11/4/2010)
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 5, 2010 at 6:43 am
andy.roberts (11/5/2010)
Chris Morris-439714 (11/5/2010)
I reckon this will set the whole EMAIL_No column to 1
I agree that with the data you have specified the EMAIL_NO column will always be 1 because...
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 5, 2010 at 6:25 am
askquestions (11/1/2010)
can anyone please explain to me in plain english what this update statement is doing (mainly the join select)
Many thanks
update tblEMAIL
set EMAIL_No = EMAILNUMBER
from tblEMAIL a
JOIN (SELECT EMAIL_ID,
row_number()...
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 5, 2010 at 5:25 am
Terse
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 4, 2010 at 8:51 am
Here's another hacky way of doing it. You would benefit from running the results of the CTE into a #Temp table first.
SELECT ISNULL(r0.DataOutPhoneNumber, ISNULL(r1.DataOutPhoneNumber, r2.DataOutPhoneNumber))
FROM #MUConfigCTE r0
LEFT JOIN #MUConfigCTE r1...
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 4, 2010 at 8:12 am
Ok here goes.
Thor (the god of Thunder) is sitting alone on his cloud, envious of the mortals enjoying themselves below. "S0d this" he thinks, floats down and assumes a body....
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 4, 2010 at 7:00 am
Brandie Tarvin (11/4/2010)
Thor
Do you know the age-old joke about Thor?
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 4, 2010 at 6:39 am
Can you please provide a full explanation of the relationship here:
FROM dbo.[Site] s
INNER JOIN dbo.Node n ON s.OwnerNodeID = n.NodeID
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 4, 2010 at 6:18 am
Hi Chris
Just as a matter of interest, what is the maximum value for RECURSIONLEVEL that ever appears in a result set from this sproc?
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 4, 2010 at 5:42 am
You're welcome. Thank you for the generous feedback 😎
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 4, 2010 at 5:32 am
-------------------------------------------------------------
-- Create a tally table - CAREFUL, this is only 120 rows / numbers
-- and should be used only for this demo
-------------------------------------------------------------
DROP TABLE #Numbers
SELECT TOP 120 n = ROW_NUMBER() OVER(ORDER...
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 4, 2010 at 4:41 am
See here.
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 3, 2010 at 8:12 am
Viewing 15 posts - 7,096 through 7,110 (of 10,143 total)