Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Select only one matching row via SQL

Avatar of JDL_Tech
JDL_TechFlag for United States of America asked on
Sybase Database
2 Comments1 Solution641 ViewsLast Modified:
Given: A Sybase SQL table arranged as "Field1 | Field2 | Field3 ...."

Each Field1 will have one or more Field2's associated with it as shown below.  Field3 is a timstamp.

Field1 | Field2a | Field3
Field1 | Field2b | Field3
Field1 | Field2c | Field3

Selecting a given Field1 would return three rows because of the three different Field2 values.  I need to return exactly one row for each unique Field1.  That row must be the one with the most recent timestamp.

Thank you

Avatar of awking00
awking00Flag of United States of America imageInformation Technology Specialist

Our community of experts have been thoroughly vetted for their expertise and industry experience.

This problem has been solved!
Unlock 1 Answer and 2 Comments.
See Answers