Viewing 15 posts - 31 through 45 (of 66 total)
Hi Mark,
Thank you. 🙂
Cheers,
Julian
SELECTA.Week, A.SALDORCNW
FROMMedewerkerUren A
WHEREEXISTS
(
SELECT*
FROMMedewerkerUren B
WHEREB.Week = A.Week-1
AND SIGN(B.SALDORCNW) <> SIGN(A.SALDORCNW)
and A.JAAR = B.JAAR
and A.PERSNR = B.PERSNR ...
April 22, 2015 at 10:13 am
Hello Luis,
Great, that works, thank you.
Cheers,
Julian
March 13, 2015 at 9:50 am
Thank you Scott. It is slowly dawning.
The first NOT clause makes all the difference.
Is this T-SQL logic different from say Excel VBA logic?
SUM the turnover of all stores NOT in...
February 5, 2015 at 1:03 pm
ScottPletcher (2/5/2015)
February 5, 2015 at 12:27 pm
Scott thank you.
I can't get my head around it though. 🙂
For one location (@IDHuis = 'WH')
I need to exclude the Hrs from the sum of one department (D.AfdelingZPT =...
February 5, 2015 at 11:52 am
Hello pmadhavapeddi22,
Thank you for pointing me in the right direction.
If the condition is not met (@IDHuis='WH') then I need to sum all hours from all D.AfdelingZPT.
So I changed the code...
February 5, 2015 at 11:22 am
Thank you.
Cheers,
J.
November 8, 2014 at 10:24 am
Got it.
IF @MeeTellen <> 'NEE'
BEGIN
-- HRS VAST
INSERT INTO @T (JAAR, WEEK, AfdelingZPT, HrsVast)
(
SELECTDBO.ISOyear(Begindatum) Jaar, datepart(ISO_WEEK,Begindatum) [Week], AfdelingZPT, sum(DUUR/60.0) HrsVast
FROM DRPDATA
WHERE LocatieCode = @IDHuis
and AfdelingZPT = @IDAfd
AND...
November 3, 2014 at 8:44 am
Solved it using Table variables.
DECLARE @T TABLE
(
AfdelingZPT varchar(3) COLLATE database_default ,
Uren Float
) ;
DECLARE @tt TABLE
(
AfdelingZPT varchar(3)...
November 1, 2014 at 4:58 am
Thanks. I should be able to figure it out.
A few beers may help (it's evening overhere 😉 )
October 31, 2014 at 12:54 pm
It seems I need another solution.
FOO returns more rows than FOB.
Thinking of using Temp tables for FOO and FOB, then joining them.
This does not work, one of the CTE's has...
October 31, 2014 at 12:32 pm
@sqlslacker: Great, thank you, works like a charm! 🙂
I find it difficult to choose the right solution, there seem to be many ways to approach things.
Regards,
Julian
October 31, 2014 at 11:04 am
Viewing 15 posts - 31 through 45 (of 66 total)