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 |
|
CLages
Posting Yak Master
116 Posts |
Posted - 2006-10-23 : 19:09:10
|
| Hi i have this table in fact this is a result of a query with joinsbut to became simple.c1 c2 c3 c4 c5 c6 c7 c8(ddmmyyyy)59 006 11425 1 2.000 428.17 856.34 15/01/2006 59 006 11425 1 1.000 228.17 456.34 16/01/2006 *59 006 11427 1 6.000 35.81 214.86 16/01/200659 006 11427 1 7.000 45.81 314.86 17/01/2006 *59 006 114421 1 12.00 26.50 318.00 17/01/2006 * 59 006 24561 1 12.00 26.90 322.80 17/01/2006 *how can get only the rows with * ?because code column c3 11425 and 11427 occurs twice , in this case i want all the rows and when occurs that one code occurs more than 1 then i want the oldest based in column c8(date)if i use a group by i can not get what i want.tks againC.lages |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-10-23 : 19:29:02
|
| Use LIKE on your column that contains *.Tara Kizer |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-10-23 : 22:34:02
|
| Select * from table Twhere c8=(Select max(c8) from table where c3=T.c3)MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|