-2

I am making a report in SSRS and some of the data is being obtained from a query, while other data such as db size is being taken from stored procedure (sp_databases)...

How can I join this data?

I was wondering what would be the best way to join these? Temp table? To my knowledge I cannot use a view since they cant call stored procedures, am I correct?

choloboy
  • 795
  • 4
  • 16
  • 38

2 Answers2

-1

Pull the data you want from the stored procedure into a temp table and use that temp table along with your query in a stored proc you can call from the SSRS report.

This question might help with the first part. Question

Community
  • 1
  • 1
Daniel E.
  • 2,029
  • 3
  • 22
  • 28
-1

You can call the results of the SP like this:

SELECT tmp.*
FROM OPENROWSET('SQLOLEDB', 'my_sqlserver_name';'my_sqluser_login';'my_sqlpass word',
'EXEC mydatabase.dbo.mystoredprodedure') AS tmp

And then join or union to your other query.

Sev09
  • 883
  • 2
  • 12
  • 27