CREATE PROCEDURE spUpdatePageHits
	@page_name varchar(100)
AS
UPDATE 
	tblPageHits 
SET 
	pghits_hitcount = pghits_hitcount + 1
WHERE
	pghits_page_name=@page_name
IF @@ROWCOUNT=0
	INSERT INTO 
		tblPageHits (pghits_page_name, pghits_hitcount)
	VALUES 
		(@page_name, 1)