MSSQL expected 4 arguments got 0

Hi,
The following execution gives me the error - expected 4 arguments, got 0.

DECLARE @SQL_Query as VARCHAR(MAX)
SET @SQL_Query = ‘SELECT 1 from <Some_DB>.dbo.<Some_Table>
where job_time between $__timeFrom() and $__timeTo()’
EXEC(@SQL_Query)

If I run below, it executes fine -
SELECT 1 from <Some_DB>.dbo.<Some_Table>
where job_time between $__timeFrom() and $__timeTo()

Please help.
Thanks

What do you see when you do

PRINT @SQL_Query bedore the EXEC
I bet it cannot parse/interpolate the time variables because they sre inside the quotes

Well, it does not let me go past the set statement and throws the error right there, no matter I print / execute the query.

Comment out the exec and run it
or use this instead

DECLARE @SQL_Query as VARCHAR(MAX)
SET @SQL_Query = 'SELECT 1 from <Some_DB>.dbo.<Some_Table>
where job_time between $__timeFrom() and $__timeTo()'
--EXEC(@SQL_Query)
SELECT @SQL_Query

vs

DECLARE @SQL_Query as VARCHAR(MAX)
SET @SQL_Query = concat('SELECT 1 from <Some_DB>.dbo.<Some_Table>
where job_time between ''', $__timeFrom(),  ''' and ''', $__timeTo(), '''')
SELECT @SQL_Query
--EXEC(@SQL_Query)

Then post back if what you see is a legit SQL query