Viewing 5 posts - 1 through 6 (of 6 total)
Chris, yes the logic is correct. I'm not sure whether IF...ELSE works , I know CASE statements work
May 21, 2010 at 6:37 am
Hey Chris I really appreciate your time here.
Basically
IF datepart(month,getdate()) >3
SELECT
p.packageID, p.ClientID, p.StartDate, p.EndDate, datepart(month,getdate()) AS currMonth
FROM p
WHERE
(((p.StartDate)<=convert(datetime, convert(varchar,datepart(year,getdate())+1) + '0331',103)) AND ((p.EndDate)>=convert(datetime, convert(varchar,datepart(year,getdate())) + '0401',103))
OR (((p.StartDate)<=convert(datetime,...
May 20, 2010 at 10:17 am
Chris, well it's basically determined by the current month which comes from:
datepart(month,getdate()) as I use this the get the FY start and end dates. I just need to incorporate the...
May 20, 2010 at 10:05 am
Chris, I tried the code you suggested might work, but doesn't seem to like the word DECLARE
I used your suggestion re WHERE datepart(month,getdate()) >3 and the following code below...
May 20, 2010 at 9:41 am
Chris, thanks for the prompt reply. The derived table is actually to be a view table in a Business Objects Universe, the underlying database being SQLserver 2005. I'm fairly new...
May 20, 2010 at 9:05 am
Viewing 5 posts - 1 through 6 (of 6 total)