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 |
|
nizmaylo
Constraint Violating Yak Guru
258 Posts |
Posted - 2001-03-30 : 15:36:06
|
| Can anyone re-write this without using group by?SELECT *, CASE WHEN date_created=MAX(date_created) THEN 1 ELSE 0 END AS 'last_added' FROM addressesGROUP BY ADDRESS_ID,SHOPPER_ID,FIRST_NAME,LAST_NAME, ADDRESS_NAME,ADDRESS_1,ADDRESS_2,POBOX,CO_NAME, CITY,STATE,ZIP_CODE,PROVINCE,COUNTRY,PHONE,FAX, DATE_CREATED,BILL_SHIP,STATUS,SAME_BILL_SHIPhelena |
|
|
|
|
|
|
|