Click here to Skip to main content
15,885,880 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i need to write a query that take 10 values from my SQL server databse at a time in a way that it takes 1 to 10 values first time than next time it takes 2 to 11.. than 3 to 12.. and so on to plot ECG continuous Graph for windows phone 8 application (C#).. in LINQ to SQL format.. and also same query for ADO.Net (SQL query) for web application in C#
Structure of Table is:
SQL
Create table ECG
(
Reading_ID int IDENTITY(1,1) not null CONSTRAINT id PRIMARY KEY,
Date_Time datetime not null default CURRENT_TIMESTAMP,
Value nvarchar(10) not null
)
Posted
Updated 27-Dec-14 5:01am
v2
Comments
BillWoodruff 27-Dec-14 2:43am    
What have you tried so far ? Show some code.
Maciej Los 27-Dec-14 11:04am    
Why Linq?

1 solution

C#
var results  = ECGs.OederBy(e=>e.Reading_ID).Skip(x).Take(y);

you can start with x=0 and y =10 and each iteration increase x by one
 
Share this answer
 
Comments
Maciej Los 27-Dec-14 14:18pm    
Sounds reasonable ;)
+5
DamithSL 27-Dec-14 20:49pm    
;) Thank you.
Member 11015112 27-Jan-15 13:33pm    
i have done it in another way.. thank you..:)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900