473,587 Members | 2,550 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to insert sequential numbers

Hello guys,
I need your help with this. I have a table that ,say, has 10 rows in it. One
of the columns is called ID and has an integer number. I would like to
change the ID number of all the rows by ascending numbers starting from 5.
For example, row number 1 has ID number 5 , row 2 has 6, row 3 has 7 and so
on:

5;.;.;.;.;
6;.;.;.;.;
7;.;.;.;.;
8;.;.;.;.;
..
..
..
15;.;.;.;

How can I do this? Thank you very much for all your efforts.
Jul 20 '05 #1
1 3615
Firewalker wrote:
Hello guys,
I need your help with this. I have a table that ,say, has 10 rows in it.
One of the columns is called ID and has an integer number. I would like to
change the ID number of all the rows by ascending numbers starting from 5.
For example, row number 1 has ID number 5 , row 2 has 6, row 3 has 7 and
so on:

5;.;.;.;.;
6;.;.;.;.;
7;.;.;.;.;
8;.;.;.;.;
.
.
.
15;.;.;.;

How can I do this? Thank you very much for all your efforts.


This was discussed in alt.comp.lang.p hp a little while back. You can browse
the thread at Google Groups here http://tinyurl.com/4pnc8

--
Chris Hope - The Electric Toolbox - http://www.electrictoolbox.com/
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
614
by: Firewalker | last post by:
Hello guys, I need your help with this. I have a table that ,say, has 10 rows in it. One of the columns is called ID and has an integer number. I would like to change the ID number of all the rows by ascending numbers starting from 5. For example, row number 1 has ID number 5 , row 2 has 6, row 3 has 7 and so on: 5;.;.;.;.; 6;.;.;.;.;...
6
12697
by: Jenn L | last post by:
I have a database that is pre-populated with sequential part numbers. As people reserve the parts I update a flag to show the # is no longer available. Now they want the ability to take out a block of "x" number of sequential part numbers - say for example 5. If my database had the following numbers available: 101 104 105 110
5
3202
by: Lapchien | last post by:
I have list of numbers in a table (originally from autonumber in a different database) from 1 to 1,000,000. The list is not in sequential order - there are loads of numbers missing. How can I identify what numbers are missing? Thanks, Lap (I'd like to then use this 'missing number list' to use for new records, instead of autonumber -...
14
12024
by: amywolfie | last post by:
Hi All: I know this is simple, but I just can't seem to get there: I need to sort a table by a text field (txtDescription), then assign sequential numbers to the field SEQUENCE in table. Every time a new record is added, the all SEQUENCE #'s must be reset. The re-numbering will be triggered by an EXPORT button.
29
27557
by: pb648174 | last post by:
I have the following basic statements being executed: Create a temp table, #TempPaging Insert Into #TempPaging (Col1, Col2) Select Col1, Col2 From SomeOtherTable Order By Col2, Col1 Select * from #TempPaging I can't provide a reproduceable scenario right now without making this
3
5826
by: Me | last post by:
Trying to get the current status of the insert key. Found my.computer.keyboard.capslock, but no such item for insert key. Anyone have some code to help. Can't figure out getkeystate. compiler chokes on rslt = getkeystate(keys.insert) ----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----...
1
2447
maxamis4
by: maxamis4 | last post by:
Hello folks, I have two forms a parent form and a subform. The parent form is an unbound form while the subform is a form that contains all a list of what I like to call 'in stock ' phone numbers. with in that subform the user has the ability to select between to radio buttons to do a bulk selection. The first option lets the user select the...
6
6964
by: jtidwell | last post by:
I am developing a Work Order Database for my job. I have a combo box with "Contract Numbers" to select from. When you select on any Contract Number I need a new "Work Order Number" to appear. There are 10 different contract numbers so I need 10 different work order numbers (N10001, O100001, etc..) to generate sequential for each new record.
3
5084
by: Finomosec | last post by:
Hi, i have a table of number-objects with beginning and endnr: 10-15 16-20 25-30 32-32 35-35 36-36 37-40
9
2934
by: Axxe | last post by:
I have searched high and low for cogent, well-explained coding to complete a project on which I have spent six months of work. I stumbled across something on this site that is close to what I seek, but, as is rather typical, I could understand neither the question nor the answer. I am hopeful that someone in this forum can provide me...
0
7920
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8215
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7973
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8220
tracyyun
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6626
agi2029
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5718
isladogs
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5394
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2358
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1454
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.