August 9, 2013 at 3:46 am
Hi,
I have 3 database like AP,TN,UP and having same tables with different data. Now my query is in ssrs i want one parameter like @Database , in this database parameter if i select AP then AP database data should be displayed in the some data in tab lix .same way UP also..
Regards,
Narendra
August 9, 2013 at 4:35 am
The best way would be to use a stored procedure, to which you pass @database as a parameter.
Inside the stored procudure, you construct a dynamic SQL statement using 3 part naming (database.schema.table). Then you execute the dynamic SQL with sp_executesql.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
August 10, 2013 at 2:36 pm
I Agree. Handling it through a SQL stored Procedure is the best option.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply