Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old August 1st, 2007, 03:47 PM
Registered User
 
Join Date: Apr 2007
Location: New Brunswick, NJ, USA.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem with tbh stored procedures! Help

Some of the features that are used in development of the database are SQL 2005 version... My hosting company version is 2000.
Anyway, Row_Number function that is used in development is not supported on the 2000 version.
Affected procedres that i cannot execute and create are:

tbh_Articles_GetArticles
tbh_Articles_GetComments
tbh_Articles_GetCommentsByArticles
tbh_Articles_GetPublishedArticles
tbh_Articles_GetArticlesByCategory
tbh_Articles_GetPublishedArticlesByCategory


Here what the querry file looks like:
/****** Object: StoredProcedure [dbo].[tbh_Articles_GetArticles] Script Date: 07/30/2007 15:56:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[tbh_Articles_GetArticles]
(
   @PageIndex int,
   @PageSize int
)
AS
SET NOCOUNT ON

SELECT * FROM
(
   SELECT tbh_Articles.ArticleID, tbh_Articles.AddedDate, tbh_Articles.AddedBy, tbh_Articles.CategoryID, tbh_Articles.Title, tbh_Articles.Abstract, tbh_Articles.Body,
      tbh_Articles.Country, tbh_Articles.State, tbh_Articles.City, tbh_Articles.ReleaseDate, tbh_Articles.ExpireDate, tbh_Articles.Approved,
      tbh_Articles.Listed, tbh_Articles.CommentsEnabled, tbh_Articles.OnlyForMembers, tbh_Articles.ViewCount, tbh_Articles.Votes, tbh_Articles.TotalRating,
      tbh_Categories.Title AS CategoryTitle,
      ROW_NUMBER() OVER (ORDER BY ReleaseDate DESC) AS RowNum
      FROM tbh_Articles INNER JOIN
         tbh_Categories ON tbh_Articles.CategoryID = tbh_Categories.CategoryID
) Articles
   --WHERE Articles.RowNum BETWEEN (@PageIndex*@PageSize+1) AND ((@PageIndex+1)*@PageSize)
   ORDER BY ReleaseDate DESC
GO
__________________________________________
So Help me please how to revrite Row_Number function to be compatable with sql 2000


Thank you in advance
  #2 (permalink)  
Old August 4th, 2007, 12:44 PM
Authorized User
 
Join Date: Jan 2007
Location: , , .
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This link may help you. I think it discusses both 2000 2005 methods:
http://www.mutuallybeneficial.com/in...umber_2005.htm

However, if it wouldn't be too big of a deal, I would consider changing hosts (or upgrading to 2005 if they have it). One good sign that a host keeps up to date with technology is that they do have sql 2005.




Similar Threads
Thread Thread Starter Forum Replies Last Post
Stored Procedures umeshtheone SQL Server 2000 0 June 19th, 2007 01:08 AM
problem with stored procedures robyd SQL Server 2000 1 October 24th, 2003 06:14 AM
problem with stored procedures robyd SQL Server 2000 7 October 23rd, 2003 12:36 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.