DECLARE @ZoneInfo TABLE
(ZoneFrom Bigint, ZoneTo Bigint ,
ZoneFromName NVARCHAR(50) , ZoneToName NVARCHAR(50) , CreatedOn DATETIME )
INSERT INTO @ZoneInfo
select 19,18,'MEG','MED','2011-12-30 03:59:13.070'
INSERT INTO @ZoneInfo
select 41,38,'FAR EAST','WCI','2011-12-30'
INSERT INTO @ZoneInfo
select 38,31,'WCI','SE ASIA','2011-12-30 03:58:30.327'
INSERT INTO @ZoneInfo
select 19,31,'MEG','SE ASIA','2011-12-30 03:58:11.327'
INSERT INTO @ZoneInfo
select 19,38,'MEG','WCI','2011-12-30 03:57:47.370'
INSERT INTO @ZoneInfo
select 41,14,'FAR EAST','ECI','2011-12-29 09:33:12.193'
INSERT INTO @ZoneInfo
select 19,18,'MEG','MED','2011-12-29 08:40:25.623'
INSERT INTO @ZoneInfo
select 41,38,'FAR EAST','WCI','2011-12-29 08:39:58.620'
INSERT INTO @ZoneInfo
select 38,31,'WCI','SE ASIA','2011-12-29 08:39:36.110'
INSERT INTO @ZoneInfo
select 19,31,'MEG','SE ASIA','2011-12-29 08:39:06.687'
INSERT INTO @ZoneInfo
select 19,38,'MEG','WCI','2011-12-29 08:38:36.690'
INSERT INTO @ZoneInfo
select 41,14,'FAR','EAST ECI','2011-12-27 07:13:15.937'
INSERT INTO @ZoneInfo
select 41,14,'FAR EAST','ECI','2011-12-27 03:41:49.897'
INSERT INTO @ZoneInfo
select 19,43,'MEG','ARA','2011-12-22 08:21:43.150'
INSERT INTO @ZoneInfo
select 41,38,'FAR EAST','WCI','2011-12-22 08:21:20.870'
INSERT INTO @ZoneInfo
select 38,31,'WCI','SE ASIA','2011-12-22 08:20:54.040'
INSERT INTO @ZoneInfo
select 19,31,'MEG','SE ASIA','2011-12-22 08:20:28.893'
INSERT INTO @ZoneInfo
select 19,38,'MEG','WCI','2011-12-22 08:18:58.717'
INSERT INTO @ZoneInfo
select 19,18,'MEG','MED','2011-12-07 08:38:11.787'
INSERT INTO @ZoneInfo
select 41,38,'FAR EAST','WCI','2011-12-07 08:37:45.487'
INSERT INTO @ZoneInfo
select 38,41,'WCI','FAR EAST','2011-12-07 08:37:19.667'
INSERT INTO @ZoneInfo
select 19,41,'MEG','FAR EAST','2011-12-07 08:36:54.240'
INSERT INTO @ZoneInfo
select 19,38,'MEG','WCI','2011-12-07 08:36:27.380'
SELECT Top 8 * FROM (
select Distinct ZoneFrom,ZoneTo,ZoneFromName,ZoneToName from
@ZoneInfo) ZITbl