473,386 Members | 1,798 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,386 software developers and data experts.

Arranging nos in a serial order

I am doing a project in VB6 using oracle 8i i.e SQL plus as backend .
I have created a database with employee addresses.
while adding data through vb it was in a serial order. but in between when i deleted few records and added a new recored, the new record occupied the space of the deleted record. i dont want it in that way.
As when i view the table it is very shabby and confusing and if i want to take a report also the serial nos are not in order.

How to make the nos be in order.
HELP please.
Jan 3 '07 #1
4 1561
I am doing a project in VB6 using oracle 8i i.e SQL plus as backend .
I have created a database with employee addresses.
while adding data through vb it was in a serial order. but in between when i deleted few records and added a new recored, the new record occupied the space of the deleted record. i dont want it in that way.
As when i view the table it is very shabby and confusing and if i want to take a report also the serial nos are not in order.

How to make the nos be in order.
HELP please.
Hi
are u adding a serial no. field, then use order by serial no.

if not, add a field which will contain the time stamp,
order by this field.
Jan 4 '07 #2
Hi
are u adding a serial no. field, then use order by serial no.

if not, add a field which will contain the time stamp,
order by this field.
Can you please tell me the query.

My table name is dummy. its fields are
sno-serial no, name, designation, address,city,state,country,pincode,ph.

I have added and deleted almost 19 addresses.

when i give this query
select sno from dummy order by sno;

The order is in this way
1
10
11
12
13
14
16
17
18
19
2
3
4
5
7
8
9
Jan 4 '07 #3
convert the serial_no into number datatype "to_number(serial_no)" and then order it
Jan 4 '07 #4
May be the type of the serial no. is playing some trick
go by this

select A.sno,A.name, A.designation, A.address,A.city,A.state,A.country,A.pincode,A.ph
from
(select to_number(trim(sno)),name, designation, address,city,state,country,pincode,ph from tablename) A

order by A.sno

so try this.

Can you please tell me the query.

My table name is dummy. its fields are
sno-serial no, name, designation, address,city,state,country,pincode,ph.

I have added and deleted almost 19 addresses.

when i give this query
select sno from dummy order by sno;

The order is in this way
1
10
11
12
13
14
16
17
18
19
2
3
4
5
7
8
9
Jan 5 '07 #5

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

Similar topics

21
by: Gavin | last post by:
Hi, I'm a newbie to programming of any kind. I have posted this to other groups in a hope to get a response from anyone. Can any one tell me how to make my VB program read the Bios serial number...
4
by: ^CeFoS^ | last post by:
Hello to everybody, I've done an application that draws in a frame the trajectory of a robot. The robot position is readed through the serial port, and several commands are wrote through the...
79
by: Klaus Bonadt | last post by:
In order to protect software from being copied without licence, I would like to use something like a key, which fits only to the current system. The serial number of the CPU or the current...
4
by: M. Raab | last post by:
i have written an application that utilizes serail ports. In order not to have to reinvent code, I decided to use John Hind's sample code that he presented in MSDN magazine last year (Serial Comm:...
7
by: Michael Chong | last post by:
I wrote a program that communicate with SerialComm. In every 300 milliseconds, my program continuously send & receive data via the serial port once the program starts. My program is once in a...
4
by: joe bloggs | last post by:
I am writing a mobile application to interface with a legacy system and I am planning to use web services to communicate with this system. The legacy system receives data through a serial port. ...
3
by: dast | last post by:
Hi, I'm successfully using Richard Grier's NETCommOCX software (www.hardandsoftware.com) to communicate with a device over the USB-port (with a USB-serial-converter) at 115200 bps. Now the...
15
by: Robby Russell | last post by:
I am trying to track down a method of determining what a sequence name is for a SERIAL is in postgresql. For example, CREATE TABLE foo (id SERIAL PRIMARY KEY NOT NULL, bar TEXT); \d foo...
7
by: psbasha | last post by:
Hi, In case of the 'dict',the stored elements will not be in a order.It will be randomly arranged ( not as list,in list the elements will be arranged in order as we store it). For Example :...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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...
0
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,...
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.