Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How to see the source of a query

Author  Topic 

Adam West
Constraint Violating Yak Guru

261 Posts

Posted - 2009-07-27 : 10:42:20
I have a query but cannot see the source. it runs and is fine but I wanted to see what its doing.

rajdaksha
Aged Yak Warrior

595 Posts

Posted - 2009-07-27 : 11:11:53
hi

it's query or Procedure...?

-------------------------
R..
Go to Top of Page

Adam West
Constraint Violating Yak Guru

261 Posts

Posted - 2009-07-27 : 11:33:18
IT's QUERy - this is what it is in Reporting Services:
SELECT *
FROM Vw_Details
Where ReportMonth = @ReportMonth and (ReportYear = @ReportYear or ReportYear = @ReportYear-1)
and CustName = @CustName ORder by ReportYear

But i can't see this in Management Studio.

I see the object there and can execute it - but cannot get to the source, similar to my problem last week with the procedure.
Go to Top of Page

SQLSoaker
Posting Yak Master

169 Posts

Posted - 2009-07-27 : 11:40:11
In reporting services click on the edit datasource button (it is usually a ... next to the datasource name in VS.

This should give you all the properties of the datasource including the query
Go to Top of Page

Adam West
Constraint Violating Yak Guru

261 Posts

Posted - 2009-07-27 : 12:05:10
OK but I want to see this in Management Studio
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-07-27 : 13:00:45
Copy and paste?
The source for the query is a view, not a function nor a procedure.



N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page

Adam West
Constraint Violating Yak Guru

261 Posts

Posted - 2009-07-27 : 13:34:53
OK i see that. it's a little different for me but no big deal.
Go to Top of Page
   

- Advertisement -