Problem with views in MS SQL

momus posted 2 weeks ago in General

I have a database in Microsoft SQLServer 2008 from which I want to selectively export some of the tables and views. The problem I am running into is that I can't actually see either the SQL that makes up the views, or the results of the views, so there is no way to know what they are.

When I select a view from the left pane the details of that view in the right pane are empty, and there is a message reading "You need the SHOW VIEW privilege in order to edit a view". I have granted the user ALL privileges on all objects in the database, and even changed the owner of the database, and all objects, to the 'sa' user I am accessing the database with, but the message persists, and I still can't see any information about the view.

The second problem is that if I attempt to run a select, or view the data from the view I get the error message "SQL Error (8169): Conversion failed when converting from character string to uniqueidentifier". This is (I assume) caused by a join within the view between a uniqueidentifier field in one table with another field in another table whose type is set to char or varchar. Unfortunately I can't examine which of these fields are causing the error because of the first problem I described.

Any help with this would be greatly appreciated. Thanks.

Please login to leave a reply, or register at first.