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 8714353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:34:41+00:00 2026-06-13T05:34:41+00:00

Possible Duplicate: Row Offset in SQL Server I have a query which has a

  • 0

Possible Duplicate:
Row Offset in SQL Server

I have a query which has a like condition and it returns around 1500 rows. Now I want to know how can I get the rows part by part, e.g. return 75 rows, then again the next 75 rows until it reaches the end of the rows. I know I can use something like SELECT TOP 75

I tried something like this but it does not return any rows

    SELECT * 
    FROM 
       (SELECT ROW_NUMBER() OVER (ORDER BY WarehouseSubType.id) as row,
               WarehouseSubType.id, 
               WarehouseType.name as WarehouseTypename,
               WarehouseType.alternateName AS WarehouseTypealternateName,
               WarehouseSubType.name AS WarehouseSubTypename,
               Warehouse.alternateName AS WarehousealternateName,
               WarehouseSubType.alternateName AS WarehouseSubTypealternateName,
               WarehouseSubType1.name AS WarehouseSubType1name,
               WarehouseSubType1.alternateName AS WarehouseSubType1alternateName,
               Warehouse.alternateName AS Warehousename,
               Branch.name AS Branchname,
               Branch.alternateName AS BranchalternateName,
               WarehouseProductQuantity.actualQuantity,
               WarehouseProductQuantity.reservedQuantity,
               Supplier.companyName, 
               Supplier.companyNameAlternate,
               Tafsil.description,
               Tafsil.alternateDescription,
                (WarehouseProductQuantity.actualQuantity - WarehouseProductQuantity.reservedQuantity) AS quantity 
        FROM WarehouseSubType 
        INNER JOIN WarehouseType ON (WarehouseSubType.warehouseTypeId = WarehouseType.id)
        INNER JOIN WarehouseSubType1 ON (WarehouseSubType.id = WarehouseSubType1.warehouseSubTypeId)
   ) a 
WHERE 
    warehouseTypename like '%Ve%' 
    AND row > 0 and row < 75
  • 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-13T05:34:43+00:00Added an answer on June 13, 2026 at 5:34 am

    The code you posted should not even compile, let alone return rows. The sub query is not closed and row would not be recognised in the inner query.

    Try this instead:

    SELECT * FROM 
       ( SELECT ROW_NUMBER() OVER (ORDER BY WarehouseSubType.id) as row,
        WarehouseSubType.id, 
        WarehouseType.name as WarehouseTypename,
        WarehouseType.alternateName AS WarehouseTypealternateName,
        WarehouseSubType.name AS WarehouseSubTypename,
        Warehouse.alternateName AS WarehousealternateName,
        WarehouseSubType.alternateName AS WarehouseSubTypealternateName,
        WarehouseSubType1.name AS WarehouseSubType1name,
        WarehouseSubType1.alternateName AS WarehouseSubType1alternateName,
        Warehouse.alternateName AS Warehousename,
        Branch.name AS Branchname,
        Branch.alternateName AS BranchalternateName,
        WarehouseProductQuantity.actualQuantity,
        WarehouseProductQuantity.reservedQuantity,
        Supplier.companyName, 
        Supplier.companyNameAlternate,
        Tafsil.description,
        Tafsil.alternateDescription,
        (WarehouseProductQuantity.actualQuantity - WarehouseProductQuantity.reservedQuantity) AS quantity 
        FROM WarehouseSubType 
        INNER JOIN WarehouseType 
            ON ( WarehouseSubType.warehouseTypeId = WarehouseType.id)
        INNER JOIN WarehouseSubType1 
            ON (WarehouseSubType.id = WarehouseSubType1.warehouseSubTypeId)) a 
        WHERE warehouseTypename like '%Ve%' ) b
    WHERE b.row > 0 and b.row< 75
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Concatenate row values T-SQL I have a table like this: ref_num name
Possible Duplicate: Concatenate row values T-SQL I'm new to SQL Server and had tried
Possible Duplicate: Auditing SQL Server data changes My requirements demand for each row inserted
Possible Duplicate: one variable row inside another variable row I have script something like
Possible Duplicate: simple DataGridView refresh question I have a mainForm which has a DataGridView
Possible Duplicate: How to detect which row [ tr ] is clicked? I have
Possible Duplicate: how to choose which row to insert with same id in sql?
Possible Duplicate: Include a blank row in query results I would like to add
Possible Duplicate: how to delete row from datagridview with a delete button? I have
Possible Duplicate: How to check if resultset has one row or more? What will

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.