Hi,
Suppose I have a table with 5 rows (t1 - t5) and 6 columns (c1 - c6) and I run a select query on it using the where clause.. (specifying value of c1) and in the result I get two rows say T1 and T4 ,,now I want to rank my results based on the other unknown columns..
Is there any way to calculate the rank (score) of the resultant rows?
3 2179 ck9663 2,878
Recognized Expert Specialist
Hi,
Suppose I have a table with 5 rows (t1 - t5) and 6 columns (c1 - c6) and I run a select query on it using the where clause.. (specifying value of c1) and in the result I get two rows say T1 and T4 ,,now I want to rank my results based on the other unknown columns..
Is there any way to calculate the rank (score) of the resultant rows?
if you could post some sample mock data, of your table and what you want to accomplish, it would be much easier..
-- CK
I'm not sure, but is this the kind of thing you are after? -
SELECT C1
-
FROM TableName
-
WHERE C1 = @SomeParameter
-
ORDER BY C2, C3, C4
-
If you want to order the results by a column in descending order, just put DESC after the column name (eg. "C2 DESC")
HTH.
Hi,
Suppose I have a table with 5 rows (t1 - t5) and 6 columns (c1 - c6) and I run a select query on it using the where clause.. (specifying value of c1) and in the result I get two rows say T1 and T4 ,,now I want to rank my results based on the other unknown columns..
Is there any way to calculate the rank (score) of the resultant rows?
Could you please be more specific or your requirement. A sample data with a sample output required will help the experts to better understand your requirement.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Phil Powell |
last post by:
Relevancy scores are normally defined by a MySQL query on a table that
has a fulltext index. The rules for relevancy scoring will exclude
certain words due to their being too short (minimum...
|
by: namcintosh |
last post by:
First of all, here is my program:
#include <iostream>
#include <conio>
using namespace std;
//Function prototype
void getscore(int&, int&, int&, int&, int&);
void findLowest (int, int,...
|
by: CrostonScottish |
last post by:
Has anybody got any ideas or nifty code for calculating the median value in a form.
I currently have a database which we use for post-course evaluations. Part of the evaluation asks the attendees...
|
by: chittasuman |
last post by:
QUESTION:
There is a xml node like
<icc>
<cricket>
<player>sachin</player>
<score>15</score>
</cricket>
<cricket>
<player>dravid</player>
|
by: Desyree |
last post by:
I am putting together a database with the fields:
1. Number of Projects
2. Project (Name)
3. Project Contact
4. Company
5. Location (City, State)
6. Last Contact Date
7. Mw/g
8. Project Type
| |
by: tonytj |
last post by:
This program will read in studentID (3 digit integer number), three quizzes score, four assignments score and two tests scores. Each of the quizzes, assignments, and tests has up to 100 points. The...
|
by: gaya12 |
last post by:
In ASP and using Ms access.
I have a form which asks users to input some details. The details entered by the user will stored in a access database and also there is a calculation based on the...
|
by: blamp |
last post by:
I have completed most of the program I just cant get the letter grade to print from the void printGrade function.The output of the program should be:
Line 1: Based on the course score, this...
|
by: rcollins |
last post by:
I have a query that runs off a criteria form. What I need to do is fix it so that when I select June from the combo box, it gives me back June, May, April and March. The format in the combo box...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |