Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-02-28 : 08:18:07
|
| Yehudit writes "Hi, I have a data table with various columns: ID, Lot, Well, Plate. There are several dupliate ID numbers (each having a different lot numnber). There rest of the columns are distinct. For ex.ID Lot1000 11000 21000 3I would like to write an SQL code that would first, run a query to select the data points according to certain criteria. Second, it would eliminate the duplicate rows with the same ID (leaving only one per ID) and return the remaining data points for all the columns. I tried wrting the following, but it did not work:SELECT distributions.ID, distributions.Lot, distributions.Well, distributions.PlateFROM distributionsWHERE (((distributions.Plate)<1000) AND ((distributions.Well >30))ORDER BY distributions.date, distributions.BioceptIN (SELECT DISTINCT distributions.ID FROM distributions)Thank you for your assistance.Yehudit" |
|
|
Nazim
A custom title
1408 Posts |
|
|
|
|
|