473,387 Members | 1,455 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Select Top 10 - tie

7
Hello,

I am running a select Top 10 query. When there is a tie this query gives me numbers more than 10. I read some other posts, which talked about 'With Tie' clause included in the Top 10 predicate in Access.

Is there any way to work around such ties and display only 10 records (whether tying or not)?

Thanks
Jun 7 '07 #1
5 2631
Rabbit
12,516 Expert Mod 8TB
Will including they primary key field cause problems?
Jun 7 '07 #2
rishhh
7
Will including they primary key field cause problems?


I do not have primary keys defined. I cant define them as this is a temporary reporting process and the data i get does not allow me to define primary keys - not even composite primary keys.
Even if there was a primary key, in this particular example, it may not be useful. Do you think there is any other way to tackle the Top 10 ties?
Thanks a lot for responding. I appreciate it.
Jun 7 '07 #3
Rabbit
12,516 Expert Mod 8TB
I do not have primary keys defined. I cant define them as this is a temporary reporting process and the data i get does not allow me to define primary keys - not even composite primary keys.
Even if there was a primary key, in this particular example, it may not be useful. Do you think there is any other way to tackle the Top 10 ties?
Thanks a lot for responding. I appreciate it.
I was just thinking that if you had a primary key, you could just throw that into the the SELECT and it would mean you can't have a tie. What about throwing an autonumber field into the mix? As long as you're not using aggregate functions then it should be fine.

I don't think there's a way to get around the tie with a SQL predicate.
Jun 7 '07 #4
rishhh
7
I was just thinking that if you had a primary key, you could just throw that into the the SELECT and it would mean you can't have a tie. What about throwing an autonumber field into the mix? As long as you're not using aggregate functions then it should be fine.

I don't think there's a way to get around the tie with a SQL predicate.


Thanks a lot for your help. I added more columns to the ORDER BY clause to further minimize the possibility of a tie. I appreciate your help.
Jun 12 '07 #5
Rabbit
12,516 Expert Mod 8TB
Thanks a lot for your help. I added more columns to the ORDER BY clause to further minimize the possibility of a tie. I appreciate your help.
Not a problem, good luck.
Jun 13 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: JT | last post by:
I have an input form for which I've created a "matrix" for user input. Basically, the user chooses a radio button and then through javascript, a select box is displayed to define a value for that...
4
by: Elroyskimms | last post by:
Using SQL 2000... tblCustomer: CustomerID int CompanyName varchar(20) HasRetailStores bit HasWholesaleStores bit HasOtherStores bit tblInvoiceMessages:
4
by: bobsawyer | last post by:
I've been building a series of SELECT lists that are populated dynamically using HTTPRequest. Things are going pretty well, and I've got the whole thing working flawlessly in Mozilla/Firebird....
3
by: dumbledad | last post by:
Hi All, I'm confused by how to replace a SELECT statement in a SQL statement with a specific value. The table I'm working on is a list of words (a column called "word") with an index int...
10
by: serge | last post by:
Using "SELECT * " is a bad practice even when using a VIEW instead of a table? I have some stored procedures that are identical with the difference of one statement in the WHERE clause. If I...
1
by: serena.delossantos | last post by:
Trying to insert into a history table. Some columns will come from parameters sent to the store procedure. Other columns will be filled with a separate select statement. I've tried storing the...
9
chunk1978
by: chunk1978 | last post by:
hey everyone, i've been trying to solve this problem for 2 days straight, with no end in sight. i would greatly appreciate anyone's help. EXPLANATION: There are 3 Select Menus. The 1st and...
2
by: naima.mans | last post by:
Hello, i want to select 2 following brothers nodes wich are one under another (one closed to another)... i have done one xslt file... but it's not really good.. for example: the xml file:...
4
by: rn5a | last post by:
A Form has 2 select lists. The 1st one whose size is 5 (meaning 5 options are shown at any given time) allows multiple selection whereas the 2nd one allows only 1 option to be selected at a time. ...
6
by: Apaxe | last post by:
In the database i have a table with this information: key_id =1 key_desc =43+34+22+12 I want sum the values in key_desc. Something like: SELECT key_desc FROM table But the result of...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.