Quantcast
Channel: SQL Server Reporting Services
Viewing all articles
Browse latest Browse all 1418

How to Use Parametized (expression) Connection String without being prompted

$
0
0

What I'd like to do is create a report that will pull data from 6 databases, where the schema is the same for all 6,

and consolidate the data into the one report.

But how can I do this without being prompted? Would I write the query to use a variable and incorporate a loop?

For example, would this work (this is pseudo code):

for each db in "db1, db2, db3, db4, db5, db6"

      SELECT * FROM @db.dbo.mytable

end

Or is there a better way to do this?


Viewing all articles
Browse latest Browse all 1418

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>