Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to retrieve range of 10th rows to 20 th rows from total
rows from a database table.? (Not from Dataset)

Answer Posted / upendra

USE CTE

http://www.4guysfromrolla.com/webtech/071906-1.shtml


WITH CTE_Table AS ( SELECT
Row_number() OVER (
ORDER BY
sort_Column ) AS RowNum
, premiumamount
FROM
shplaninfo )

SELECT
*
FROM
CTE_Table
WHERE
RowNum BETWEEN ( 10 ) AND ( 19 )

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different normalization forms?

1164


When would you prefer to have a minimum number of indexes?

961


Explain “not null constraint” in sql server?

1090


What are the rendering extensions of ssrs?

160


how would you write a sql query to compute a frequency table of a certain attribute involving two joins? What changes would you need to make if you want to order by or group by some attribute? What would you do to account for nulls?

1690


where can you add custom error messages to sql server? : Sql server administration

1176


How to generate create view script on an existing view?

1041


What are the restraints imposed on the table design by a merge replication?

1090


What are the advantages of user-defined functions over stored procedures in sql server?

1117


Can a table be created inside a trigger?

1014


Can select statements be used on views in ms sql server?

1112


What are the advantages of using a stored procedure?

1062


What is the purpose of data source?

1092


What is use of attribute hierarchy ordered ? : sql server analysis services, ssas

1056


How to create user messages with print statements in ms sql server?

1031