SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO ALTERProc blog_GetEntryByID ( @EntryID int, @BlogID int ) as SELECT bc.BlogID, bc.[ID], bc.Title, bc.DateAdded, bc.[Text], bc.[Description], bc.SourceUrl, bc.PostType, bc.Author, bc.Email, bc.SourceName, bc.DateUpdated, bc.TitleUrl, bc.ParentID, bc.FeedBackCount, bc.PostConfig, bc.EntryName,vc.WebCount,vc.AggCount FROM blog_Content bc LeftJOIN blog_EntryViewCount vc ON (bc.[ID]= vc.EntryID ) WHERE bc.ID=@EntryID and bc.BlogID=@BlogID GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO