August 17, 2013 at 2:47 pm
I am creating a parameter with the default value as test
in the dataset i need to use it in the query for the schema name. how do i do it
select * from (Parameters!param0.value).tablename;
i am getting an error missing right parenthesis. NOt sure how to do it? any suggestion
August 17, 2013 at 7:15 pm
You may use dynamic SQL statements. something like,
--@schema is parameter
Declare @val1 nvarchar(500)
SET @val1 ='Select * from ' + @schema+'.'+'TableName'
execute(@val1)
September 9, 2013 at 10:37 am
Snigdha Vartak (8/17/2013)
You may use dynamic SQL statements. something like,--@schema is parameter
Declare @val1 nvarchar(500)
SET @val1 ='Select * from ' + @schema+'.'+'TableName'
execute(@val1)
In similar case, Dynamic SQL worked for me.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply