mssql now diff 90 day 1

mssql now diff 90 day

Where YourDate >= (GetDate() - 90)

Here is what the above code is Doing:
1. We’re creating a variable called “sql” and assigning it a string value.
2. We’re using the triple-quote syntax to create a multi-line string.
3. We’re using the string.format() method to insert the value of the “table” variable into the SQL statement.
4. We’re using the string.format() method to insert the value of the “column” variable into the SQL statement.
5. We’re using the string.format() method to insert the value of the “date” variable into the SQL statement.
6. We’re using the string.format() method to insert the value of the “days” variable into the SQL statement.
7. We’re using the string.format() method to insert the value of the “where” variable into the SQL statement.
8. We’re using the string.format() method to insert the value of the “where_date” variable into the SQL statement.
9. We’re using the string.format() method to insert the value of the “where_days” variable into the SQL statement.

Similar Posts