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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 filter and order by filter

Author  Topic 

skillile
Posting Yak Master

208 Posts

Posted - 2001-11-08 : 14:37:15
here's my dilemma.

create table #temp (num int)
insert #temp values (1110)
insert #temp values (1130)
insert #temp values (1122)
insert #temp values (1148)
insert #temp values (1133)
insert #temp values (1121)


declare @filter int
set @filter = 1122

select * from #temp
where num >= @filter or num <= @filter


drop table #temp

--i want to be able to filter all
--my records and have the filtered
--record show up first in the list
--followed by the rest of the numbers
--in sequence
--should look like

1122
1130
1133
1148
1110
1121
--any suggestions

slow down to move faster...
   

- Advertisement -