Viewing 15 posts - 7,096 through 7,110 (of 10,144 total)
Award-winningly sketchy spec, but here goes:
SELECT
offenders = Agg.OffendersOfThisTypeInThisCounty,
m.County_Name,
m.Web_Desc,
'1' AS 'Address_Type'
FROM (
SELECT c.County_Code, c.County_Name, t.Offender_Type_LKP_ID, t.Web_Desc
FROM SPGlobalLookups.dbo.County_LKP c
CROSS JOIN dbo.Offender_Type_LKP t
) m
LEFT JOIN (
SELECT o.Offender_Type_LKP_ID, a.County_Code, OffendersOfThisTypeInThisCounty = COUNT(*)
FROM...
November 9, 2010 at 6:55 am
-- 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...
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.
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,...
November 5, 2010 at 7:21 am
GSquared (11/5/2010)
CirquedeSQLeil (11/4/2010)
Grant Fritchey (11/4/2010)
CirquedeSQLeil (11/4/2010)
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...
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()...
November 5, 2010 at 5:25 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...
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....
November 4, 2010 at 7:00 am
Brandie Tarvin (11/4/2010)
Thor
Do you know the age-old joke about Thor?
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
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?
November 4, 2010 at 5:42 am
You're welcome. Thank you for the generous feedback 😎
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...
November 4, 2010 at 4:41 am
Viewing 15 posts - 7,096 through 7,110 (of 10,144 total)