Viewing 15 posts - 481 through 495 (of 3,543 total)
SELECT Section
FROM #temp
ORDER BY
SIGN(PATINDEX('%[a-zA-Z]%',Section)) ASC,
CAST('0'+LEFT(Section,PATINDEX('%[a-zA-Z]%',Section+'A')-1) as int) DESC,
RIGHT(Section,LEN(Section)-(PATINDEX('%[a-zA-Z]%',Section+'A')-1)) ASC
August 27, 2015 at 7:20 am
Jeff Moden (8/24/2015)
I've written all my own such as sp_ShowWorst and sp_WhatsRunning...
Care to share 🙂
August 25, 2015 at 4:02 am
Sean Lange (8/20/2015)
...Obvious they have absolutely no idea how the current query works at all.
About sums me up with queries I write :hehe: 😀
Does that mean you won't help me...
August 21, 2015 at 1:54 am
Sean Lange (8/19/2015)
August 19, 2015 at 9:13 am
Koen Verbeeck (8/6/2015)
What's this cursor thing? 😀
It's the precursor to a pork chop launcher 😛
August 6, 2015 at 5:48 am
SELECT ISNULL(Month,'TOTAL'),Resource,DepDate,SUM(Increase),SUM(Proj_Bkd),SUM(Vol_Target),SUM(Difference_B_T),SUM(Difference_Proj_T),SUM(Perc_Bkd_Trgt),SUM(Final_Prev_Year),SUM(Booked_SDL),SUM(Perc_Booked_To_Final)
FROM temp
GROUP BY Month,Resource,DepDate
WITH ROLLUP
HAVING (GROUPING(Resource) = 0 AND GROUPING(DepDate) = 0) OR GROUPING(Month) = 1
ORDER BY GROUPING(Month) ASC,DepDate ASC
July 27, 2015 at 6:13 am
PATINDEX('% [2] %', ' ' + Marketing_Special_Attributes + ' ')
will give you char position in the string
or zero if not found
July 17, 2015 at 6:16 am
Why are you using a subquery?
SELECTZIF19_ACCDOC_H_T.GJAHR,ZIF19_ACCDOC_H_T.MONAT,HWAER,UKURS
,UseRate = CASE WHEN UKURS = 0 THEN 1 / dbo.MonthlyExRates.Rate
ELSE dbo.ZIF19_ACCDOC_H_T.UKURS END
FROMdbo.ZIF19_ACCDOC_H_T
JOIN dbo.MonthlyExRates
ON ZIF19_ACCDOC_H_T.GJAHR = dbo.MonthlyExRates.GJAHR
AND ZIF19_ACCDOC_H_T.MONAT = dbo.MonthlyExRates.MONAT
AND...
July 10, 2015 at 6:52 am
=Sum(Switch(
Fields!Operating_System.Value = "Microsoft Windows 7 Workstation" and Fields!Version.Value = "11",1,
Fields!Operating_System.Value = "Microsoft Windows Server 2008 R2" and Fields!Version.Value = "11",1,
Fields!Operating_System.Value = "Microsoft Windows Server 2008 SP2" and Fields!Version.Value = "9",1,
Fields!Operating_System.Value...
July 10, 2015 at 6:46 am
Your outermost IIf does not have a value for false, you must supply one
What does the ultimate result of 0 or 1 represent?
What value do you want to return if...
July 10, 2015 at 6:31 am
And from ten years ago!
Don't forget good procedure
DROP Dirty_Nappy
GO
SELECT Clean_Nappy FROM Nappy_Pile WHERE COUNT(Clean_Nappy) > 0
INSERT Baby INTO Clean_Nappy
GRANT ALL Smiles to Baby
GO
And the mandatory function
CREATE FUNCTION Daddys_Turn ()
...
June 30, 2015 at 1:55 am
Why do you select data first and then update?
If you want details of rows updated add OUTPUT clause to the update statement
June 22, 2015 at 6:49 am
That looks like a standard update to me, something like this
UPDATEp
SETp.A = t.A,
p.B = t.B
FROMdbo.products p
JOIN dbo.temp t
ON t.productid = p.productid
If you need to add new rows as well then...
June 16, 2015 at 1:39 am
stevefromOZ (6/12/2015)
ahh but David, Surname is in table2 not table1. How would we get the value from table2 instead? :hehe:
Deliberate mistake 😛
😀
June 12, 2015 at 7:04 am
Viewing 15 posts - 481 through 495 (of 3,543 total)