Use a WHERE in the UPDATE
UPDATE receipt set longvalue=datediff(dd,transactiondate, Issuedate)
WHERE datediff(dd,transactiondate, Issuedate) >365
UPDATE receipt set shortvalue=datediff(dd,transactiondate, Issuedate)
WHERE datediff(dd,transactiondate, Issuedate) <= 365
Upcoming events: * Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ... "I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless." My website