There isn't an exact solution that I know of. Since a view can't pass parameters to a table-value function, you might have trouble doing this.
If you can use a table-value function instead of a view, here's a possible solution:
create function udf_NameAccountZip ()
returns @NAZ table (
RowNumber int identity primary key)
insert into @naz(name, account, zip)
select name, account, zip
from (... table(s) here...)
order by ...
You'll need to modify it to take input parameters.
If that won't work (if you can't change the front-end code from accessing a view to accessing a udf, for example), I can't think of a solution for SQL 2000.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon