Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8949357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:12:06+00:00 2026-06-15T13:12:06+00:00

I am using C# and SQL Server 2008 ,here i attach my query.i want

  • 0

I am using C# and SQL Server 2008 ,here i attach my query.i want to set limit for dynamic grid view . I need this query for paging on the dynamic grid view how can i

SELECT 
    Item.ItemID,Item.TypeID,Item.StatusID,Item.SeverityID,Item.PriorityID,Item.ProjectID,Item.ReleaseID,
    Item.ClientID,Item.Body,Item.CreatedBy,Item.CreatedDate,Item.ModifiedBy,Item.ModifiedDate,Item.IsActive, 
item.[Subject], Type.Name as Type, status.Name as Status, Project.Name as Project,Release.Name as Release,
Priority.Name as Priority,Severity.Name as Severity,Client.Name as Client,
ROW_NUMBER() OVER (ORDER BY ItemID) AS Rowis

FROM Item (NOLOCK)  
LEFT OUTER JOIN  [Type] (NOLOCK)  ON Item.TypeID = [Type].TypeID
LEFT OUTER JOIN  [Status] (NOLOCK) ON Item.StatusID = [Status].StatusID
LEFT OUTER JOIN [Project] (NOLOCK) ON Item.ProjectID=[Project].ProjectID
LEFT OUTER JOIN [Release] (NOLOCK) ON Item.ReleaseID =[Release].ReleaseID 
LEFT OUTER JOIN [Priority] (NOLOCK) ON Item.PriorityID=[Priority].PriorityID 
LEFT OUTER JOIN [Severity] (NOLOCK) ON Item.SeverityID =[Severity].SeverityID
LEFT OUTER JOIN [Client] (NOLOCK) ON Item.ClientID =[Client].ClientID 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T13:12:08+00:00Added an answer on June 15, 2026 at 1:12 pm

    @PageIndex and @PageSize are parameters sent through from the application layer.

    DECLARE @PageIndex INT = 1
    DECLARE @PageSize INT = 10
    
    SELECT * FROM 
    (
        SELECT 
            Item.ItemID,Item.TypeID,Item.StatusID,Item.SeverityID,Item.PriorityID,Item.ProjectID,Item.ReleaseID,
            Item.ClientID,Item.Body,Item.CreatedBy,Item.CreatedDate,Item.ModifiedBy,Item.ModifiedDate,Item.IsActive, 
        item.[Subject], Type.Name as Type, status.Name as Status, Project.Name as Project,Release.Name as Release,
        Priority.Name as Priority,Severity.Name as Severity,Client.Name as Client,
        ROW_NUMBER() OVER (ORDER BY ItemID) AS Rowis
    
        FROM Item (NOLOCK)  
        LEFT OUTER JOIN  [Type] (NOLOCK)  ON Item.TypeID = [Type].TypeID
        LEFT OUTER JOIN  [Status] (NOLOCK) ON Item.StatusID = [Status].StatusID
        LEFT OUTER JOIN [Project] (NOLOCK) ON Item.ProjectID=[Project].ProjectID
        LEFT OUTER JOIN [Release] (NOLOCK) ON Item.ReleaseID =[Release].ReleaseID 
        LEFT OUTER JOIN [Priority] (NOLOCK) ON Item.PriorityID=[Priority].PriorityID 
        LEFT OUTER JOIN [Severity] (NOLOCK) ON Item.SeverityID =[Severity].SeverityID
        LEFT OUTER JOIN [Client] (NOLOCK) ON Item.ClientID =[Client].ClientID 
    )
    AS Results
    WHERE Rowis BETWEEN (@PageIndex - 1) * @PageSize + 1 AND @PageIndex * @PageSize --Paging
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using SQL Server 2008 R2 I have a complex query which I need
using Visual.Web.Developer.2010.Express; using SQL.Server.Management.Studio.2008.R2; Kinda new at C# here.. I got the first row
Here is one very interesting problem. I am using SQL Server 2008. I have
I am using SQL server 2008, and I need to make a common delimeted
Here are the following records of my tables: (I'm currently using SQL Server 2008)
Alright so a quick SQL question here(using sql-server-2008). I have a mapping table names
(Using SQL Server 2008) I could easily get this to work if I built
This is a question for a SQL expert. I'm using SQL Server 2008 R2
I am using SQL Server 2008 and I need to run a SQL Job
I'm using SQL Server 2008 with Report Builder 2.0 to try and query data

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.