Showing posts with label view. Show all posts
Showing posts with label view. Show all posts

Tuesday, March 27, 2012

Cannot edit RS reports...!

I'm new at using RS, so please bear with me...
I need to make small changes to existing reports. I'm able to execute
the reports and view the report list through the Report Manager, but I
don't ge the "Edit" options for the reports.
What security options must I have to be able to edit the reports?
Also, are the RDLs stored in the Catalog table? I ask because I can't
find an RDL on the report server to save my life...
Thanks!The edit button allows saving the RDL out to a file. Then you use the
designer to modify it and then deploy it back to the server. You should
install the designer on your local machine.
Are you getting prompted for a place to save the file when you click on the
edit button. If not then it is a security issue and you need to be added to
the appropriate role in Reporting Services.
RS stores the RDL in the database but you should not go directly against the
database. I haven't bothered to look but I doubt if it is in a readable
format anyway.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Kerc" <jkercado@.gmail.com> wrote in message
news:1128533548.040646.285220@.g44g2000cwa.googlegroups.com...
> I'm new at using RS, so please bear with me...
> I need to make small changes to existing reports. I'm able to execute
> the reports and view the report list through the Report Manager, but I
> don't ge the "Edit" options for the reports.
> What security options must I have to be able to edit the reports?
> Also, are the RDLs stored in the Catalog table? I ask because I can't
> find an RDL on the report server to save my life...
> Thanks!
>|||I'm not getting the "Edit" button...I just get the "General" tab with
the information...That's why I asked about security settings, something
is preventing me from getting the report source.|||When you click on properties you say you see the General tab. There should
be a section on that page that says Report Definition and has a link that
says Edit.
You have to click on the report (i.e. one by one) and then do properties for
that repor. You cannot do a whole directory.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Kerc" <jkercado@.gmail.com> wrote in message
news:1128538895.020947.111580@.f14g2000cwb.googlegroups.com...
> I'm not getting the "Edit" button...I just get the "General" tab with
> the information...That's why I asked about security settings, something
> is preventing me from getting the report source.
>

Tuesday, March 20, 2012

Cannot create view WITH VIEW_METADATA

I'm trying to create a view and make it updatable using an INSTEAD OF UPDATE trigger. This works OK on SQL Server 2005 (even with compatibility level 80), but on SQL Server 2000 I receive an error message:

"Could not perform CREATE VIEW because WITH VIEW_METADATA was specified and the view is not updatable."

The following sql reproduces the problem.

CREATE TABLE test (a int, b int)
go
INSERT INTO test VALUES(1,0)
INSERT INTO test VALUES(2,0)
INSERT INTO test VALUES(3,1)
INSERT INTO test VALUES(3,1)
go

CREATE VIEW testview WITH VIEW_METADATA AS
SELECT a,SUM(b) b FROM test GROUP BY a
go

CREATE TRIGGER TR_testview_U ON testview INSTEAD OF UPDATE AS
BEGIN
UPDATE test SET b=inserted.b
FROM test INNER JOIN inserted ON test.a = inserted.a
END
go

SELECT * FROM test
SELECT * FROM testview
UPDATE testview SET b=2 WHERE a=3
SELECT * FROM test
SELECT * FROM testview
go

DROP VIEW testview
DROP TABLE test

I want my view to be updatable so I can use it in my VB6/ADO application, and the trigger won't fire unless I specify VIEW_METADATA.

When you create any view with following operation (operator/clause) , that view will be become as NOT UPDATEABLE VIWE, when it is not UPDATABLE you can’t specify the WITH VIEW_METADATA.

TOP,

GROUP BY,

UNION

DISTINCT

|||Thanks for the reply. As I said in SQL Server 2005 this works, just wondering why not in SQL Server 2000 - WITH VIEW_METADATA is precisely for making non UPDATABLE views updatable, according to BOL

"When a view is created by using WITH VIEW_METADATA, all its columns, except a timestamp column, are updatable if the view has INSTEAD OF INSERT or INSTEAD OF UPDATE triggers."

which seems to imply that the columns wouldn't have been updatable without VIEW_METADATA.

Cannot Create new View!

Ok, Here is the problem. I need to implement view to enforce a rule I have. I have the following SQL statement:

CREATE VIEW v_new_cable

AS SELECT Make_ID, Model_ID, PurchaseDate, Equipment_ID, Description, Vendor_ID, Image_ID

FROM Inventory$
WHERE Equipment_ID = '3' -- The number 3 represents a cable.

Anyway I check the syntax and that checks out ok. Then I get an Alert Message saying that:

The Query Designer does not suppor the CREATE VIEW SQL Contruct.

What does that mean and how do I fix this?

Thanks!What are you using to write the query, i.e. what editor?|||I am creating a new view. (right click new view)

I am then typing in the following into the middle white box.

(I'm a new to SQL Server)|||Dont know the answer to that one..try posting a question on this forum....:

http://www.sqlservercentral.com/forum/forum.asp?FORUM_ID=9&CAT_ID=1&Forum_Title=General|||when you use enterprise manager to create a view:
- to enter the select statement in the middle box
- click the save button in the left top
- enter the new for the view and press ok

If you want to type your complete statement yourself, you can use the Query Analyzer.

Monday, March 19, 2012

Cannot create index on view

Hi,
I have created a view but I cannot create index on it. My view is like this:
Create view v2 with schemabinding as
select distinct count_big(orderid) as MyCount from dbo.orders group by
orders.customerid
and my index command is:
create unique clustered index myidx2 on v2(MyCount)
I get this error:
Server: Msg 1936, Level 16, State 1, Line 1
Cannot index the view 'Northwind.dbo.v2'. It contains one or more disallowed
constructs.
Whats wrong?
Any help would be greatly appreciated.
AminConsult the documentation - distinct is not allowed.
"Amin Sobati" <amins@.morva.net> wrote in message
news:umwVwcECEHA.2308@.tk2msftngp13.phx.gbl...
> Hi,
> I have created a view but I cannot create index on it. My view is like
this:
> Create view v2 with schemabinding as
> select distinct count_big(orderid) as MyCount from dbo.orders group by
> orders.customerid
> and my index command is:
> create unique clustered index myidx2 on v2(MyCount)
> I get this error:
> Server: Msg 1936, Level 16, State 1, Line 1
> Cannot index the view 'Northwind.dbo.v2'. It contains one or more
disallowed
> constructs.
> Whats wrong?
> Any help would be greatly appreciated.
> Amin
>
>

Sunday, March 11, 2012

Cannot create an instance of OLE DB provider "VFPOLEDB"

I created a view refer to a visual foxpro with ole db for visual foxpro which was working fine before. But now, I received an error while select the view

Msg 7302, Level 16, State 1, Line 1
Cannot create an instance of OLE DB provider "VFPOLEDB" for linked server "ORST3".

Please advise. Thanks in advance

Hi Stephanie,

You posted this question to microsoft.public.data.oledb on April 3. Later in the thread you said you were successful getting it working, partly due to enabling "Allow inprocess" in the OLE DB setup.

Is this a new problem since you posted on April 3?

Thursday, March 8, 2012

Cannot create a order by view

Hello,

I am trying to create a simple view which uses self joins. I want the final result order by. I am able to create the view using Top clause followed by order by but when I simply query the view it does not appear in the correct order. Can some body help me with the issue.

CREATE VIEW [dbo].[vw_SalesRep_Chaining]

AS

SELECT Top 100 percent Rep_id AS RepId,

Rep_cd AS RepCode,

Region as Region,

CASE WHEN Market IN ('Arizona - North', 'Arizona - South', 'Gtr TX / New Mexico') THEN 'Arizona / New Mexico'

WHEN Market IN ('L.A. Metro - West', 'L.A. Metro - North', 'L.A. Metro - East') THEN 'LA Metro'

WHEN Region = 'Western' AND Market NOT IN ('Arizona - North', 'Arizona - South', 'Gtr TX / New Mexico', 'L.A. Metro - West', 'L.A. Metro - North', 'L.A. Metro - East') THEN 'Western - Other'

ELSE '' END AS Sub_Region,

RSM AS RSM,

UPPER(Regional_Manager) AS Regional_Manager,

Market,

Rep_Manager_id AS SalesManager,

UPPER(MarketManager) AS MarketManager,

New_Position AS NewPosition,

Rep_Status AS RepStatus,

UPPER(Rep_Payroll_name) AS PayrollName

FROM (SELECT SalesRep_GUID, Rep_id, Rep_cd, Rep_Payroll_name, Rep_SSN, Rep_Status, Hire_dt, Termination_dt, Commission_start_dt,

Rep_Manager_id, Region, Market, New_Position, Validity_start_dt, Validity_end_dt, Load_interval_id, Create_process_id, current_ind

FROM dbo.SalesRep

WHERE (current_ind = 1) AND (New_Position IN ('SC1', 'SC2', 'SC3', 'MSO')) AND (Region NOT IN ('Emerging Market')) OR

(current_ind = 1) AND (New_Position IS NULL) AND (Region IN ('TeleSales')) AND (Region NOT IN ('Emerging Market'))) AS A

INNER JOIN (SELECT Rep_id RepId, Rep_Payroll_name as MarketManager, Rep_Manager_id as RSM

FROM dbo.SalesRep AS SalesRep_2

WHERE (current_ind = 1)) AS B

ON A.Rep_Manager_id = B.Repid

INNER JOIN (SELECT Rep_id RepId1, Rep_Payroll_name as Regional_Manager FROM dbo.SalesRep AS SalesRep_1

WHERE (current_ind = 1)) AS C

ON B.RSM = C.Repid1

WHERE (A.Region IS NOT NULL)

Order by Rep_Id, Rep_Cd

This is the script I have used to create the view. But when is simply query the view it does not appear in the order of Rep_Id, Rep_Cd

Order of rows in any table (both tables and views are considered tables) is not guaranteed. You have to use an order by clause in SELECT statements to get data back in a given order:

A few other threads:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=409367&SiteID=1

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=245259&SiteID=1

Wednesday, March 7, 2012

Cannot copy column names view result set

In SQL 2005 - when I display the results of a View and Copy all rows and columns, the resulting Paste in Excel does not include the column names.

How can I set SQL 2005 so the names of the columns will come along with the content of the copy function?

Background:

When I am using a SQL Query (instead of a view) I have the ability to control whether or not I am able to Include the Column Headers when copying or saving results. The control exists in the Options > Query Results > Results to Grid > Include column headings etc.

My question is how to get this same ability when attempting to copy the results of a VIEW vs. a Query.

Thank you,

Poppa Mike

The same way. Instead of opening the view into that grid thingy, open a query window and do a select from the view.|||

Yes Michael - I've thought of that but it causes me to take two steps. One to create the view and a second to get the results of the view by running a query against the view. I'd like to avoid the SQL Two-Step and just have the ability to copy the results from the view like I used to be able to do in SQL 2000. I appreciate your thoughts.

Regards, Poppa Mike

|||I was searching for the the same thing ..what i did was instead of selecting results to grid..choose the result as result to text and U can open the result file in excel and sort it out.