Forum Replies Created

Viewing 5 posts - 1 through 6 (of 6 total)

  • RE: using CASE in a WHERE clause

    Chris, yes the logic is correct. I'm not sure whether IF...ELSE works , I know CASE statements work

  • RE: using CASE in a WHERE clause

    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,...

  • RE: using CASE in a WHERE clause

    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...

  • RE: using CASE in a WHERE clause

    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...

  • RE: using CASE in a WHERE clause

    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...

Viewing 5 posts - 1 through 6 (of 6 total)