473,320 Members | 2,146 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,320 software developers and data experts.

I want every 100 th record in total of 1000 recors in a table.

kiss07
99
Hi,

I want every 100 th record in total of 1000 recors in a table.

pls send query.

Thks,
Kiss07
Jan 5 '07 #1
6 2445
bartonc
6,596 Expert 4TB
Hi,

I want every 100 th record in total of 1000 records in a table.

pls send query.

Thks,
Kiss07
The row in the 100th place will change over time as records are deleted and added, so this is not a good practice. Use something like itemID for one of your columns then:
SELECT * FROM `tablename` WHERE itemID = 100

In future posts, I won't have to make up names if you post your table structure.
Jan 7 '07 #2
kiss07
99
Dear friend ,

I want subquery.Your query is easier one .
Thanks,

Kiss07
Jan 8 '07 #3
Try something like this:

Expand|Select|Wrap|Line Numbers
  1. SELECT *
  2. FROM table
  3. where rownum mod 100 = 0;
  4.  
This will get you the last row from every hundred, though a mentioned above they may change as you add new items to the table.

Leo

Dear friend ,

I want subquery.Your query is easier one .
Thanks,

Kiss07
Jan 9 '07 #4
sushma
4
hi,
I am just giving an example.
Taking an employee1 table and retriving the 5th record in it. Hope it will help you.

SQL> select * from (select rownum RN,ename from employee1) where RN/5=1;

RN ENAME
---------- ----------
5 MARTIN

just give 100 instead of 5 to get 100th record.

in case of any issues let me know.

Regards
Sushma.N
Jan 10 '07 #5
sushma
4
Hi sorry my previous reply gives only 100th record if you need every 100th record the query for the same will be

select ename from (select rownum r,ename from employee1)
where mod(r,100)=0;
Jan 10 '07 #6
kiss07
99
Dear sushma,

Thanku very much..


Regards,

Kiss07.
Jan 11 '07 #7

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

Similar topics

6
by: Hari Om | last post by:
Here are the details of my error log files: I execute the command and get following message at console: ---------------------------------------------------------------------- ../sqlldr...
5
by: eric | last post by:
Hi,everyone: I have my xml data defined as xml data definition I: <?xml version="1.0"?> <parents> <parent> <id>1000</id>
6
by: 6thirty | last post by:
Hi, I've created a stocktaking database using Access XP. This is indexed by two fields - part number and shelf location. I am currently inputting all the data via a form. When I have entered a...
2
by: Louis1 | last post by:
I am just going crazy. I have a report that requires page totals. I got the report working, except that my page has ELEVEN records (ok), but the page total includes data on the TWELFTH record....
2
by: carrionk | last post by:
Hi, I need to compare if certain records are contained whithin a Master Table. The following tables illustrates the comparing tables and the required Result Master Table ============...
48
by: Jimmy | last post by:
thanks to everyone that helped, unfortunately the code samples people gave me don't work. here is what i have so far: <% Dim oConn, oRS, randNum Randomize() randNum = (CInt(1000 * Rnd) + 1) *...
1
by: soahil | last post by:
Hello to everybody! I want that during inserting values in the master/detail form whenever I select a Company ID and enter BILL Amount against that company and SAVE that record then It should SAVE...
1
by: Matt | last post by:
I have table that has the following fields: JobNumber WeekEndingDate ReportRequired_01 ReportRequired_02 every Friday morning the weekending date changes. I need to automatically generate...
4
by: doxtor | last post by:
Dear all.. I try to make an inventory control, with FIFO(first in first out) base, but I have a problem with the next record. this is the code i make : $db = new clsDBMassimo; $product_id...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.