I have been trying to get the following to work for a while and I keep encountering road-blocks so I am hoping someone can point me in the right direction.

I need to create a view. The logic is as follows:

```
Select (database fields) 
from table01
where 
     (if current month < 7 then use 01/07/{previous year}
else
     use 01/07/{current year})

```

I can't use an If (CASE) in the Where section of a query so I am not sure how to proceed. I also can't use variables in View statements so I am a bit stuck there.

I looked at creating a SPROC to return the correct date value but I don't think I can use a SPROC in a view as part of the Where statement can I?

Has anyone got any suggestions about how I might tackle this problem?

Thanks

Simon