Hi everyone,
I have 100 record in table. and I want to show data in ListView only 20 record.
but every 20mn I want to change to other 20 record else. How to do it?
If all know about it please tell me.
Thank Advance.
From: Mala
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Manath PathanaPosted Jun 5, 2011, 10:28 PM
please show me with simple data?
coz i need to use it with .net language.
Suthish NairPosted Jun 3, 2011, 5:52 AM
if object_id('tempdb..#t1') is not null
DROP TABLE #t1;
with cte as (
select 10 id
union
select 20
union
select 30
union
select 40
union
select 50
union
select 60
union
select 70
union
select 80
union
select 90
union
select 100
)
select ROW_NUMBER() over (order by id) as rn, id into #t1 from cte
--select * from #t1 where rn between 1 and 5 (for your case 1 and 20)
select * from #t1 where rn between 6 and 10 (for your case 21 and 40)
You need to store the next between value and later send to db and fetch the record.
The values must be dynamic, do not hard code..