November 1, 2010 at 5:37 am
I have attached result for the Query.
Now my question is without this condition and b.Callback < '2009-12-31 00:00:00' i am getting two rows. If i apply that condition then i will get only one row but i dont need any row if that condition satisfy. Can anyone let me know how can i modify that query?
select a.KeyInstn, b.KeyQuestionnaireTracking, b.KeyQuestionnaire, b.KeyInstn, b.KeyFinl,
b.Callback, b.MostRecentSequence, c.StandardDate, c.KeyFinlEOP, c.FiscalQuarter,
d.DateEndedStandard
from Instn a
join QuestionnaireTracking b on b.KeyInstn = a.KeyInstn
join Finl c on c.KeyFinl = b.KeyFinl
join FinlEOP d on d.KeyFinlEOP = c.KeyFinlEOP
where b.KeyQuestionnaire in (0, 63, 29, 30, 32, 33, 35, 36, 37, 38, 39, 41, 42, 67, 44, 45, 1, 2, 64,
46, 47, 48, 49, 50, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62)
and b.MostRecentSequence =1
and d.CurrentFinl =1
and c.AppStatus = 2
--and b.Callback < '2009-12-31 00:00:00'
and a.KeyInstn =100095 --and 111111
order by a.KeyInstn
November 1, 2010 at 7:26 am
DO NOT WASTE EVERYONE'S TIME BY CROSS-POSTING!!!
All: do not reply to this post. Use this link: http://www.sqlservercentral.com/Forums/Topic1013781-391-1.aspx
+--------------------------------------------------------------------------------------+
Check out my blog at https://pianorayk.wordpress.com/
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply