I'm not sure I follow you.
A View is just a saved Select statement. It can't be dynamic, really.
You can sort of do a dynamic view with an inline-table UDF, which is essentially a view with input parameters.
A stored procedure could take an input parameter of which type of account you want to look at, based on a value passed by the application, and could select different things from different objects (tables, views, UDFs) based on the inputs.
But I'm not sure if that's what you're trying to do or not.
- 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