내부 쿼리를 조건문을 추가 :UPDATE
UPDATE empPac
SET quantityLimit = allocation,
allocationStart = '"&allocationStart&"',
nextUpdate = DATEADD(mm, allocationMonths, "&allocationStart&"),
lastUpdate = GETDATE(),
quantityIssued = 0,
quantityShipped = 0
WHERE allocation IS NOT NULL AND
allocationMonths <> 0 AND
(nextUpdate <= DATEADD(mm, "&checkCondition&", GETDATE()) OR
nextUpdate IS NULL) AND
empIdent in (select empIdent
from employee
where custIdent='"&custIdent&"')
내가 오히려 WHERE allocation IS NOT NULL
을하는 것보다, 나는 그것이 조건문을 갖고 싶어되도록 SET quantityLimit = allocation
에 조건문을 추가한다 싶지 같은 SET quantityLimit = ((allocation IS NULL) ? 0 : allocation)
MSSQL. 내가 작성한 조건문은 PHP 약식이지만, 내가 한 일의 예를 보여줄 방법을 알지 못했습니다. – scarhand