• oh I see, thanks for your reply, you surely did help me learn something new about SQL server.

    I wanted to create a variable, which is the first day of the last month. and I have multiple queries that reference this variable. But I guess I would have to set up this variable at the beginning of each batch.