Click here to Skip to main content
15,905,508 members

Comments by mikybrain1 (Top 171 by date)

mikybrain1 25-Aug-16 11:52am View    
HiThe values < or > 10 to be returned should be the one in the HAVING clause
mikybrain1 26-May-16 8:18am View    
Because I want compare parm1 and parm2 and then get the Delta.

The value now (2016) and the value I planed in 2014 for 2016 and then the Delta.

So in this case:
ProjectNr Current period (2016) Supposed period (2016) Delta
Z.123 25 200 -175
mikybrain1 26-May-16 5:41am View    
Hi digimanus,
My SP is wired. Can u please take a look at my reply to Chill60 and see if u can help?
mikybrain1 26-May-16 5:32am View    
Hi Chill60,
Lets forget what I have tried so far. Let say I am stucked in getting the expected results.
My intention is to get the value in this year (2016) which is the current year and get the value of the year (either 2012 or 2014) which I thougt will accrued in the cuurent year (2016)
Example
if I set the two parameters to @yaer1 = '03.2012', @year2 = '06.2016' Then
ProjectNr. Current period (2016) Supposed period (2016)
Z.123 25 50

And if I set the two parameters to @yaer1 = '04.2014', @year2 = '06.2016' Then
ProjectNr. Current period (2016) Supposed period (2016)
Z.123 25 200

So @year2 is the cuurent year so it get the value 24 form the column cur.yr.
@year1 is not now (2016), so it goes to @year1 and then search for the current year(2016) and then give me the value.
For 2012 it goes to the cloumn cur.yr+4 (2012 + 4 = 2016)
2014 it goes to the column cur.yr+2 (2014 + 2 = 2016)

I hope it somehow clear :)
mikybrain1 17-Jun-15 4:54am View    
Thnx to CHill60 who make me think further even when I#m desperated.