New answers tagged view
Which option from above will perform better? Best case, both will produce exactly the same execution plan, with the same runtime performance. This can require some careful design and some fairly advanced skills, as Rob Farley mentions in his answer. Rob also has a blog post describing the core issue, and it is also discussed in one of his chapters from ...
I show some important things about views in my talk at http://bit.ly/Simplification - the key thing would be to make sure that you're not doing needless joins, that they get optimised out when you don't need those columns. My talk generally covers the idea of modularisation for an interface for developers, so it's probably quite useful.
after additional research I discovered that the real answer for my situation was the use of RIGHT OUTER JOIN like this: dbo.Customer ON dbo.Customer_Ship.Customer_ID = dbo.Customer.Customer_ID RIGHT OUTER JOIN my last comment also has a link to the page that helped me out the most
Unquoted identifiers in SQL are implicitly converted to upper case, so the statement create view remotetabletest creates the view named 'REMOTETABLETEST', not 'remotetabletest'. In other words, the following should return the expected result: select * from user_tab_privs where TABLE_NAME = 'REMOTETABLETEST'
For the unused stored procedures you can make use of dmv's especially sys.dm_exec_procedure_stat. To find unused stored procs, please see the answer as explained by Aaron Bertrand. Also, there is an good read to identify as explained here in the article How to find unused Stored Procedures in SQL Server 2005/2008 To tack down unused views: a) ...
To get the output you mentioned, you may run the following query. Basically, it is the same as yours with GROUP BY added: SELECT `new`.`SRPartsID` AS `SRPartsID`, `new`.`RepairID` AS `RepairID`, `new`.`SRNo` AS `SRNo`, `new`.`DateReceived` AS `DateReceived`, `new`.`ShipmentDate` AS `ShipmentDate`, ...
I figured it out myself. First, I created an account that ONLY had permissions to certain columns (not all). I then created a view for those columns and used the user as the definer. Then, I created another test account and ONLY gave them permissions to that view. So the test user could not see the underlying table but only the view and columns. Works ...
Top 50 recent answers are included