Viewing 2 posts - 1 through 2 (of 2 total)
UPDATE tblCustomer
SET PaymentCount = (SELECT Count(PaymentID) FROM tblPayment P WHERE P.CustomerID = C.CustomerID)
FROM tblCustomer C
October 19, 2005 at 9:20 am
#598316
--For example:
DECLARE @month_num int
SET @month_num = 3
SELECT Datename( month, DATEADD( month, @month_num-1, 0 ) )
October 19, 2005 at 7:46 am
#598238