Using variables in SQL Query Table

Using variables in SQL Query Table

I'd like to create a query table making use of variables (dates). I'm unable to use DECLARE to set variables due to the SELECT only restriction. How should I go about analyzing data based on date ranges without modifying 50 lines of code each time I want to adjust the statement?


Additionally, is it possible to access a zoho db from my desktop using SSMS?

Thanks!