2010-04-22

Poop Duty

Erin snapped this as she waited for the bus. Man, the things governmental officials do for our safety.
Sent via BlackBerry by AT&T

Ava and Pompey

Finally, Ava is settling in and is snuggling like crazy. Her agility with the other dogs is getting better! I'm dying to get back into the saddle and train her for confirmation... I want to get the champion into her and out in the ring.
Sent via BlackBerry by AT&T

2010-04-20

loop through records

-- runningCaseTotal


DECLARE @rowcount INT,
@item_no VARCHAR(20),
@id INT -- identity key to track rows with
SET @rowcount = (SELECT COUNT(*) FROM dbo.production_availability_ready_not_ready)
-----------------------------
--UPDATE dbo.production_availability_ready_not_ready
--SET runningCaseTotal = NULL
-----------------------------

WHILE @rowcount>0
BEGIN
-------TESTING-----------------
--PRINT 'ROWCOUNT: ' + CONVERT(VARCHAR(20),@rowcount)
--SET @id = (SELECT TOP 1 id FROM dbo.production_availability_ready_not_ready WHERE runningCaseTotal IS null)
--PRINT '..processing @id ' + CONVERT(VARCHAR(20),@id)
--SET @item_no = (SELECT [Item No_] FROM dbo.production_availability_ready_not_ready WHERE id = @id)
--UPDATE dbo.production_availability_ready_not_ready SET runningCaseTotal = 0 WHERE id = @id
--PRINT 'item_no: ' + CONVERT(VARCHAR(20),@item_no)
--PRINT '---------'
-----------------------------




SET @rowcount = @rowcount-1;


END