Click here to Skip to main content
15,900,461 members
Home / Discussions / Database
   

Database

 
AnswerRe: Export Data to text file Pin
Dave Kreskowiak20-May-07 14:07
mveDave Kreskowiak20-May-07 14:07 
QuestionListbox + get query Pin
Thommie.h20-May-07 2:38
Thommie.h20-May-07 2:38 
Questionhow to connect to a web database Pin
lune1219-May-07 22:07
lune1219-May-07 22:07 
AnswerRe: how to connect to a web database [modified] Pin
Dave Kreskowiak20-May-07 5:05
mveDave Kreskowiak20-May-07 5:05 
QuestionRe: how to connect to a web database Pin
lune1220-May-07 9:15
lune1220-May-07 9:15 
AnswerRe: how to connect to a web database Pin
Christian Graus20-May-07 12:32
protectorChristian Graus20-May-07 12:32 
AnswerRe: how to connect to a web database Pin
Colin Angus Mackay20-May-07 20:56
Colin Angus Mackay20-May-07 20:56 
QuestionHow to query this? [modified] Pin
Arun.Immanuel19-May-07 4:26
Arun.Immanuel19-May-07 4:26 
The table consists of 3 columns:
ID,Date,Value.

Sample Data:
ID   Date       Value
1    1/1/2004   243
2    1/1/2004   0
3    1/1/2004   32423

1    2/1/2004   2435
2    2/1/2004   545
3    2/1/2004   0


The above table holds transactions for last 3 months for each ID(from 1 to 1000).
It will have records till yesterday.

I need a query that return 5 rows for each ID having value >0.



The result might look like:

for ID=1:last 5 dates where value>0
for ID=2:last 5 dates where value>0
and so on.



Thanks in advance.


Or atleast is there any way to find the 2nd maximum along with group by.

Or atleast is there any way to combine "top" along with group by.




-- modified at 12:26 Saturday 19th May, 2007

Regards,
Arun Kumar.A

AnswerRe: How to query this? Pin
enjoycrack19-May-07 6:10
enjoycrack19-May-07 6:10 
GeneralRe: How to query this? Pin
Arun.Immanuel19-May-07 6:28
Arun.Immanuel19-May-07 6:28 
GeneralRe: How to query this? Pin
enjoycrack19-May-07 7:02
enjoycrack19-May-07 7:02 
GeneralRe: How to query this? Pin
Arun.Immanuel19-May-07 16:54
Arun.Immanuel19-May-07 16:54 
GeneralRe: How to query this? Pin
faizankhan20-May-07 21:24
faizankhan20-May-07 21:24 
QuestionHow can I access to a resource that is created in another thread? Pin
ali_reza_zareian18-May-07 23:44
ali_reza_zareian18-May-07 23:44 
AnswerRe: How can I access to a resource that is created in another thread? Pin
Colin Angus Mackay19-May-07 11:50
Colin Angus Mackay19-May-07 11:50 
QuestionSql server 2000 Pin
Ravindra Rayudu18-May-07 19:13
Ravindra Rayudu18-May-07 19:13 
AnswerRe: Sql server 2000 Pin
enjoycrack19-May-07 6:14
enjoycrack19-May-07 6:14 
QuestionSQL Server Internal Commands Pin
Werries18-May-07 6:14
Werries18-May-07 6:14 
AnswerRe: SQL Server Internal Commands Pin
dhbaer18-May-07 7:13
dhbaer18-May-07 7:13 
GeneralRe: SQL Server Internal Commands Pin
Giorgi Dalakishvili18-May-07 7:33
mentorGiorgi Dalakishvili18-May-07 7:33 
GeneralRe: SQL Server Internal Commands Pin
Werries19-May-07 19:40
Werries19-May-07 19:40 
Questiondatabase connection through proxy server Pin
sridhar vattam18-May-07 2:33
sridhar vattam18-May-07 2:33 
AnswerRe: database connection through proxy server Pin
dhbaer18-May-07 7:14
dhbaer18-May-07 7:14 
QuestionDataGridView databound DataTable wont update? [modified] Pin
MrRhino18-May-07 1:43
MrRhino18-May-07 1:43 
AnswerRe: DataGridView databound DataTable wont update? Pin
MrRhino20-May-07 0:35
MrRhino20-May-07 0:35 

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.