Click here to Skip to main content
15,921,837 members
Home / Discussions / Database
   

Database

 
GeneralRe: Trigger Problem Pin
Mairaaj Khan7-Nov-06 19:51
professionalMairaaj Khan7-Nov-06 19:51 
GeneralRe: Trigger Problem Pin
vbkenya8-Nov-06 0:31
vbkenya8-Nov-06 0:31 
Questiondeclaration of variables Pin
Ravi Shankar436-Nov-06 19:56
Ravi Shankar436-Nov-06 19:56 
AnswerRe: declaration of variables Pin
coolestCoder6-Nov-06 20:28
coolestCoder6-Nov-06 20:28 
GeneralRe: declaration of variables Pin
Ravi Shankar436-Nov-06 20:52
Ravi Shankar436-Nov-06 20:52 
AnswerRe: declaration of variables Pin
Mairaaj Khan6-Nov-06 20:50
professionalMairaaj Khan6-Nov-06 20:50 
QuestionWhat is the Sql Query? Pin
kumar bharat bhusanam6-Nov-06 19:15
kumar bharat bhusanam6-Nov-06 19:15 
AnswerRe: What is the Sql Query? Pin
coolestCoder6-Nov-06 20:34
coolestCoder6-Nov-06 20:34 
Hi,
If you have some ID field, you can do something like this ---
If you have emp table like this --
Emp_Id  Emp_Name  Emp_Salary
1	ABC	2500.0000
2	ACD	1000.0000
3	AND	6000.0000
4	SVN	10000.0000
5	AYK	8500.0500
6	AT	8500.0000
7	NM	8500.0000
8	AK	5000.0000
9	VD	20000.0000
10	VP	100.0000
11	CV	8500.0000



then you can do something like this--

SELECT *
FROM (SELECT TOP 3 *
FROM (SELECT TOP 5 *
FROM EMP	
ORDER BY EMP_ID ASC) AS T10
ORDER BY EMP_ID DESC) AS T5
ORDER BY EMP_ID ASC


this will return records from 3 to 5
you can change values dynamically (from program) to get desired results

hope i am clear !


"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder

coolestCoder

GeneralRe: What is the Sql Query? Pin
PavanPareta10-Nov-06 2:24
PavanPareta10-Nov-06 2:24 
Questionplz solve this Pin
Ravi Shankar436-Nov-06 19:07
Ravi Shankar436-Nov-06 19:07 
AnswerRe: plz solve this Pin
coolestCoder6-Nov-06 19:47
coolestCoder6-Nov-06 19:47 
GeneralRe: plz solve this Pin
Ravi Shankar436-Nov-06 20:12
Ravi Shankar436-Nov-06 20:12 
Questionhow to access errors from sql server 2000 in vb.net Pin
king sunny6-Nov-06 18:31
king sunny6-Nov-06 18:31 
AnswerRe: how to access errors from sql server 2000 in vb.net Pin
coolestCoder6-Nov-06 19:51
coolestCoder6-Nov-06 19:51 
QuestionSQL appending result rows Pin
xoxoxoxoxoxox6-Nov-06 12:57
xoxoxoxoxoxox6-Nov-06 12:57 
AnswerRe: SQL appending result rows Pin
Stathread6-Nov-06 18:31
Stathread6-Nov-06 18:31 
GeneralRe: SQL appending result rows Pin
xoxoxoxoxoxox7-Nov-06 5:24
xoxoxoxoxoxox7-Nov-06 5:24 
QuestionReporting Services snapshots - multiple parameters Pin
mdipalma786-Nov-06 9:39
mdipalma786-Nov-06 9:39 
Questionquery Pin
Ravi Shankar435-Nov-06 20:10
Ravi Shankar435-Nov-06 20:10 
AnswerRe: query Pin
sam#5-Nov-06 20:20
sam#5-Nov-06 20:20 
GeneralRe: query Pin
Ravi Shankar435-Nov-06 20:25
Ravi Shankar435-Nov-06 20:25 
QuestionADO.NET Connection String Option Pin
jellofissi5-Nov-06 19:59
jellofissi5-Nov-06 19:59 
QuestionHow do you update automatically created strongly-typed datasets? [modified] Pin
nzmike3-Nov-06 22:07
nzmike3-Nov-06 22:07 
QuestionHow to get column names of a table Pin
Aqueel3-Nov-06 19:34
Aqueel3-Nov-06 19:34 
AnswerRe: How to get column names of a table Pin
ChandraRam3-Nov-06 23:59
ChandraRam3-Nov-06 23:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.