|
Posted by Steve on 09/29/90 11:33
Erland Sommarskog wrote:
> Steve Jorgensen (nospam@nospam.nospam) writes:
>> I can't tell if the OP is dealing with a fixed set of tables, or if new
>> tables are bring continuously created. If the former, then I guess the
>> view would work. If the later, then it would not.
>
> In such case, you would have to regenerate the view dynamically. Hey, in
> SQL 2005 you could set up a database trigger and change the view
> definition as soon as a table is created or dropped.
>
> Of course, it is a trade-off where you want the dynamic stuff. One
> advantage with creating the view dynamically is that this can be performed
> in an admin job. Dynamic SQL in the procedures, requires that the user who
> runs it have direct permissions to the tables.
>
The double-bad news is that table are created or dropped frequently, at
least during the initial deployment, and the database is SQL Server 2000,
always. Company standards, ya' know. Can you point me to a good tutorial or
book on creating dynamic views? That would solve another data access
problem that is looming on the horizon -- I can feel it coming. The view
could be regenerated daily during off-hours, and that would be sufficient.
BTW: I tried the suggestion from Terry Kreft and got things working.
Best regards,
Steve
[Back to original message]
|