Digitalcandy
IS-IT--Management
I have a table that has ~20 columns of various types such as boolean, nvarchar, and numeric. Is it possible to select the Top 1 of all records for each key?
Sample:
TravLotID(key) Gold(boolean) Status(Nvarchar)
2 1 today
2 1 today
3 0 tomorrow
3 0 tomorrow
3 0 tomorrow
4 1 next week
4 1 next week
Based on the TravLotID field, I'd like to grab the Top row of all columns, so the TravLotID doesn't duplicate.
TravLotID(key) Gold(boolean) Status(Nvarchar)
2 1 today
3 0 tomorrow
4 1 next week
Thanks.
Sample:
TravLotID(key) Gold(boolean) Status(Nvarchar)
2 1 today
2 1 today
3 0 tomorrow
3 0 tomorrow
3 0 tomorrow
4 1 next week
4 1 next week
Based on the TravLotID field, I'd like to grab the Top row of all columns, so the TravLotID doesn't duplicate.
TravLotID(key) Gold(boolean) Status(Nvarchar)
2 1 today
3 0 tomorrow
4 1 next week
Thanks.