Viewing 15 posts - 6,481 through 6,495 (of 10,143 total)
dave_vicary (11/8/2011)
CAST (SUM(case when GeoResolutionCode = 1 then 1 else 0 end)AS FLOAT) Coordinate,
and then rounded them on the outer selection...
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, 2011 at 5:59 am
Looks about right.
Try
SUM(Coordinate/Total*100.00) Coordinate
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, 2011 at 5:35 am
Put another SELECT around it Dave, like this:
SELECT
CONTRY_NAME_LC,
Total,
Coordinate,
Street,
Hi_Res,
Street_Name,
Postcode,
District,
City,
County,
Region,
[State],
CRESTA,
Country,
[None]
FROM (
SELECT
CONTRY_NAME_LC,
COUNT(GeoResolutionCode) as Total,
SUM(case when GeoResolutionCode = 1 then 1 else 0 end)...
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, 2011 at 5:12 am
Welsh Corgi (11/7/2011)
ChrisM@Work (11/7/2011)
1.Change FROM #TXActivityTemp to 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 7, 2011 at 9:03 am
Changing the query in the first post on this thread from using a temp table to a derived table is this straightforward:
1.Change FROM #TXActivityTemp to FROM () d
2.Copy 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 7, 2011 at 6:28 am
Perhaps rCTE's provide some incentive for tightening up the definition of RBAR. I've always read RBAR as meaning row by row coding. rCTE's are not - they're row by row...
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 7, 2011 at 3:25 am
GilaMonster (11/4/2011)
Lowell (11/4/2011)
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, 2011 at 10:05 am
This might yield a little improvement:
FROM Email AS E
LEFT OUTER JOIN UserContact AS UC
ON E.UserID = UC.UserID
LEFT OUTER JOIN ContactDetail AS CD
ON UC.ContactID = CD.ContactID
AND CD.StartDate <= @pEffectiveDate
AND CD.EndDate...
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, 2011 at 8:45 am
Adi Cohn-120898 (11/4/2011)
Lowell (11/4/2011)
as i remember it, the key to look for is the property "Reason For...
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, 2011 at 8:38 am
Save the two different plans.
Swap the two queries around in the script, run until you get two different plans again.
Compare the four plans.
The results suggest that plan generation is dependant...
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, 2011 at 5:13 am
Revenant (11/3/2011)
SQLRNNR (11/3/2011)
Ray K (11/3/2011)
overwhelmedoverweight
Overfed
Crispy crackling
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, 2011 at 10:24 am
Kiara (11/2/2011)
ChrisM@Work (11/2/2011)
Jeff Moden (11/2/2011)
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, 2011 at 2:35 am
select
top 1
396 as Feed_Sequence_Number,
'DT' as Detail_Record_Indicator,
'000077647' as Producer_Number,
convert(varchar(8), dateadd(s,-1,dateadd(mm,...
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 2, 2011 at 8:41 am
Suresh B. (11/2/2011)
mohnish_khiani (11/2/2011)
Why the order by clause cannot be used in the query which makes up the query in a view??
Not only in SELECT statement, views be used 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
November 2, 2011 at 7:45 am
Jeff Moden (11/2/2011)
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 2, 2011 at 7:33 am
Viewing 15 posts - 6,481 through 6,495 (of 10,143 total)