TheBugSlayer
Programmer
Hi all. Is there a way to make the query below dynamic? The date is constant, but is also needs to be passed to the query.
Something along the lines of
which returns NULL where I am expecting the pulse value. The original MDX query returns two columns (...[MEMBER_CAPTION] and [Measure.Pulse]...maybe that' s the problem. I really have not gotten to studying MDX yet. This simply query works on its own...once I can make it dynamic I will devote time to studying BI...
Thank you.
MCP SQL Server 2000, MCTS SQL Server 2005, MCTS SQL Server 2008 (DBD, DBA)
Code:
SELECT a.* FROM OpenRowset('MSOLAP','DATASOURCE=RPTSRV00; Initial Catalog=CatalogAx;','SELECT [Client].[Main].&[XYZ] on rows, [Measures].[Pulse] on columns FROM [PulseABC] WHERE [Calendar].[Date].&[2010-10-21T00:00:00]') as a
Code:
SELECT C.ClientID,
(SELECT * FROM OpenQuery(OLAP_LINKED_RPTSRV00,
'SELECT [Client].[Main].&['' + C.Main + ''] on rows,
[Measures].[Pulse] on columns
FROM [PulseAccession] WHERE [Calendar].[Date].&[2010-10-21T00:00:00]'))
FROM Client C
Thank you.
MCP SQL Server 2000, MCTS SQL Server 2005, MCTS SQL Server 2008 (DBD, DBA)