When right-clicking on an object, I'd like to see an option for scripting with the DDL statements stripped. Here's an example. I have a view: CREATE VIEW dbo.V_VIEW1 AS SELECT t1.*, t2.pk as t2pk FROM dbo.T_TABLE1 t1 inner join dbo.T_TABLE2 t2 on t1.pk = t2.fk GO Then I open a new window and write a script: SELECT * FROM T_TABLE3 t3 inner join V_VIEW1 v1 on t3.fk = v1.t2pk In the script, I'd like to be able to right-click on V_VIEW1 and click "Script object unencapsulated" (or something) and it would open a new window with this in it: SELECT t1.*, t2.pk as t2pk FROM dbo.T_TABLE1 t1 inner join dbo.T_TABLE2 t2 on t1.pk = t2.fk I end up doing a lot of refactoring where I have to flatten views and this would be very helpful. |
![]() |