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

comparing two values in same but in different rows

i have a table with following columns destination next hop and distance i have two rows with same destination number but different distances i want to use the next hop of the destination whose distance is the least
Mar 29 '13 #1
1 1165
r035198x
13,262 8TB
What have you tried? hint: The MIN function can give you the least value in a column.
Mar 29 '13 #2

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

Similar topics

2
by: Robert | last post by:
Hi there! I have a problem I can't get rid of... I hope anyone can help me with it! For a room-booking application I need to select available rooms for a given period. First I do the...
1
by: Francesco Moi | last post by:
Hi. I've got this piece of code: ----------------//--------------------- <html><head> <style type="text/css"> #block {margin:0 0 0 0; display:block;} ..left-pic {display:block; float:left;}...
27
by: Ben Finney | last post by:
Antoon Pardon wrote: > I just downloaded your enum module for python > and played a bit with it. IMO some of the behaviour makes it less > usefull. Feedback is appreciated. I'm hoping to...
2
by: Stefan van Roosmalen | last post by:
Hi there, I have Orders and Payments. Sometimes the Orders do not have Payments. So, I decided to use LEFT JOIN. Furthermore, some Orders have 1 related Payment, and some Orders have 2 or even...
2
by: Garimella | last post by:
Hi Experts. Need a help in writing a query. Here is the scenario. table has three columns : Emp Id, Book Name, Book Number sample data is...... 1 ten 1 1 two 2 1 Thr 3
0
by: debjanidutta090483 | last post by:
How different forecolor is given in different rows of a MSFlexGrid in VB6 during runtime?
4
bugboy
by: bugboy | last post by:
I have a foreign key table for defining many to many relationships in two other tables. This table (MapTable) has two foreign keys, aID and bID. MapTable aID | bID I start the query knowing 2...
2
by: idioteque | last post by:
If I have the following table: Client# ....... Value 24 ................ A 24 ................ G 24 ................ F 25 ................ A 25 ...
4
by: CGatto | last post by:
Hello, Just wondering if anyone has ever managed to find a way to have a datagridviewimagecolumn display different images on different rows depending on some data element in the row. Our...
4
by: user1980 | last post by:
Hello there I have a strange issue and just wanted to know if it is possible in SQL 2005. Can somebody please guide me on this. I have a column with data like 223 245 356 223 356 222 223...
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:
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
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...
0
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...
0
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,...

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.