Click here to Skip to main content
15,902,112 members
Home / Discussions / Database
   

Database

 
Questionhow can I get top(N) rows for each group Pin
Dobromir Dimitrov25-Mar-08 21:31
Dobromir Dimitrov25-Mar-08 21:31 
GeneralRe: how can I get top(N) rows for each group Pin
i.j.russell29-Mar-08 9:17
i.j.russell29-Mar-08 9:17 
GeneralGive example : How I can Use index in sql table Pin
Ashish Kumar Vyas25-Mar-08 21:06
Ashish Kumar Vyas25-Mar-08 21:06 
GeneralRe: Give example : How I can Use index in sql table Pin
Ashfield25-Mar-08 22:14
Ashfield25-Mar-08 22:14 
GeneralRe: Give example : How I can Use index in sql table Pin
Ashish Kumar Vyas26-Mar-08 19:06
Ashish Kumar Vyas26-Mar-08 19:06 
GeneralRe: Give example : How I can Use index in sql table Pin
Ashfield26-Mar-08 21:53
Ashfield26-Mar-08 21:53 
GeneralRe: Give example : How I can Use index in sql table Pin
Justin Porteous27-Mar-08 9:03
Justin Porteous27-Mar-08 9:03 
QuestionSql Query? [modified] Pin
rahul.net1125-Mar-08 19:49
rahul.net1125-Mar-08 19:49 
Hi I want to create a sql query which meet following criteria but i can't understand how can i write this. I tried a lot but did not successed.
My table structure is as follow.
ATA_Question.

Qid -- Catid -- Subcatid -- SortOrder -- Question --
1 1 1 1 question.

Suppose the table contain 30 question having catid=1 and sort number varies between 1 to 9. Now i want to show the first top 12 question which having catid=1 and sort order in ascending.
If Question 30 having sort order 1 and catid=1 then my query return top 12 question which having sort order in ascending. First it show question having sort order 1 then next sort order 2 and so on and return top 12 question.
How can i write the query for this. Please help me?

I have solved that one
Regards
Rahul

People Laugh on me Because i am Different but i Laugh on them
Because they all are same.

modified on Wednesday, March 26, 2008 2:36 AM

GeneralRe: Sql Query? Pin
pmarfleet25-Mar-08 20:46
pmarfleet25-Mar-08 20:46 
GeneralSQL Execution Error Failed to Convert from dateTime to TimeSpan Pin
AAGTHosting25-Mar-08 10:37
AAGTHosting25-Mar-08 10:37 
GeneralRe: SQL Execution Error Failed to Convert from dateTime to TimeSpan Pin
Pete O'Hanlon25-Mar-08 11:25
mvePete O'Hanlon25-Mar-08 11:25 
GeneralRe: SQL Execution Error Failed to Convert from dateTime to TimeSpan Pin
AAGTHosting25-Mar-08 11:40
AAGTHosting25-Mar-08 11:40 
Questiondirect link to install SQL Server 2005 Express Pin
KrisnNala25-Mar-08 8:59
KrisnNala25-Mar-08 8:59 
GeneralRe: direct link to install SQL Server 2005 Express Pin
Dave Kreskowiak25-Mar-08 10:00
mveDave Kreskowiak25-Mar-08 10:00 
GeneralRe: direct link to install SQL Server 2005 Express Pin
KrisnNala25-Mar-08 22:10
KrisnNala25-Mar-08 22:10 
GeneralRe: direct link to install SQL Server 2005 Express found Solution Pin
KrisnNala26-Mar-08 2:18
KrisnNala26-Mar-08 2:18 
GeneralRe: direct link to install SQL Server 2005 Express Pin
Dave Kreskowiak26-Mar-08 13:34
mveDave Kreskowiak26-Mar-08 13:34 
GeneralInsert bulk data Pin
zafax_25-Mar-08 7:45
zafax_25-Mar-08 7:45 
QuestionREPLACE function doesn't always work Pin
adi.rusu25-Mar-08 5:56
adi.rusu25-Mar-08 5:56 
GeneralRe: REPLACE function doesn't always work Pin
PIEBALDconsult25-Mar-08 6:29
mvePIEBALDconsult25-Mar-08 6:29 
GeneralRe: REPLACE function doesn't always work Pin
adi.rusu25-Mar-08 6:51
adi.rusu25-Mar-08 6:51 
GeneralRe: REPLACE function doesn't always work Pin
PIEBALDconsult25-Mar-08 13:12
mvePIEBALDconsult25-Mar-08 13:12 
GeneralRe: REPLACE function doesn't always work Pin
adi.rusu25-Mar-08 22:17
adi.rusu25-Mar-08 22:17 
QuestionInsert Quert Creates problem Pin
Syed Shahid Hussain24-Mar-08 21:38
Syed Shahid Hussain24-Mar-08 21:38 
GeneralRe: Insert Quert Creates problem Pin
Christian Graus25-Mar-08 0:05
protectorChristian Graus25-Mar-08 0:05 

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.