Q: Get date less 1 day I want to know the data for September 19th.
When the 20-day value is entered, I don't know how to express the expression of the variable to get the value of the day before.
(@TransDate-1) <---- 
How can I fix this?   (datatype is only varchar)
DECLARE @TransDate VARCHAR(10)
SET @TransDate = '2019-09-20'

SELECT ItemCode, SUM(Quantity)
FROM INVENTORYOUTDETAIL
WHERE TransDate <= @TransDate-1 AND FacilityCode = '10' AND OutType='MOVE' 
GROUP BY ItemCode


A: Use DATEADD():
DATEADD(day, -1, @TransDate)

Demo on DB Fiddle:
DECLARE @TransDate DATE
SET @TransDate = '2019-09-20'
SELECT DATEADD(day, -1, @TransDate)


| (No column name)    |
| :------------------ |
| 19/09/2019 00:00:00 |

In your query:
SELECT ItemCode, SUM(Quantity)
FROM INVENTORYOUTDETAIL
WHERE 
    TransDate <= DATEADD(day, -1, @TransDate) 
    AND FacilityCode = '10' 
    AND OutType='MOVE' 
GROUP BY ItemCode


Note: you should be declaring variable @TransDate  as a DATE rather than VARCHAR, and then:


*

*if column TransDate has a DATE-like datatye, you can compare it directly with the variable

*if column TransDate is a VARCHAR, the safest way to proceed is to convert it to a DATE first before comparison, so: CONVERT(date, TransDate) <= DATEADD(day, -1, @TransDate)
