Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 10045

OPENQUERY using MDX

$
0
0

Hi,

I am using MDX query union with sql query. when i use OPENQUERY it's not allow multivalued parameter.i am using this query in SSRS.The parameter also getting from SSRS

My OPENQUERY is like below.

DECLARE @MDXExpression VARCHAR(MAX)
DECLARE @Customerid VARCHAR(10) --multivalue parameter

SELECT @MDXExpression =
'
SELECT {[Measures].[Count]} ON 0,
{[ProcessDate].[Date].[Date]} ON 1
FROM
(SELECT (STRTOSET("[Customer].[CustomerID].&[' + @Customerid+']")) ON 0 FROM
[MailSort])))
'

EXEC ('SELECT * INTO tempdb..##tmpCustomer FROM OpenQuery(LNKSER,''' + @MDXExpression + ''')')

SELECT
    CONVERT(VARCHAR,"[Measures].[Count]") AS count1,
    CONVERT(VARCHAR,"[ProcessDate].[Date].[Date].[MEMBER_CAPTION]") AS PDate
FROM  
    ##tmpCustomer

Thanks in ADVANCE

Paramesh


Viewing all articles
Browse latest Browse all 10045

Trending Articles



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