Focal Point
[SOLVED]Execute SQL passthrough MDX query?

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/2847081286

May 04, 2016, 06:05 PM
Michael Paul
[SOLVED]Execute SQL passthrough MDX query?
Hey All,

Is it possible to execute a SQL passthrough MDX query to a Tabular model? I am using WF7703 and using a MFD built off the model works, but I'd like to use custom MDX for a particular situation.

Is this possible? I assume not based on this thread, but just double checking...

Related focal point post


Thanks!

This message has been edited. Last edited by: <Emily McAllister>,
May 04, 2016, 10:02 PM
BabakNYC
The Adapter doc doesn't say anything about passthru for SQL Server Analysis Services.


WebFOCUS 8206, Unix, Windows
May 05, 2016, 01:57 PM
dhagen
You can using OPENQUERY if this is SQL Server and SSAS.

Very old example:

ENGINE SQLMSS SET DEFAULT_CONNECTION IRDB
SQL SQLMSS
SELECT
CAST("[Account].[Level 03].[MEMBER_CAPTION]" AS varchar(50)) as ACCOUNT,
CAST("[Measures].[Amount]" AS float) as AMOUNT,
CAST("[Measures].[AmountSMLY]" AS float) as AMOUNTSMLY,
CAST("[Measures].[FiscalAmount]" AS float) as FISCALBALANCE,
CAST("[Measures].[FiscalAmountSMLY]" AS float) as FISCALBALANCESMLY,
CAST("[Measures].[COGS]" AS float) as COGS,
CAST("[Measures].[FiscalCOGS]" AS float) as FISCALCOGS

FROM openquery(OLAP_FINANCE,
'SELECT { [Measures].[Amount], [Measures].[AmountSMLY],
[Measures].[FiscalAmount], [Measures].[FiscalAmountSMLY], [Measures].[COGS], [Measures].[FiscalCOGS] } ON COLUMNS ,
{ [Account].[Profit and Loss].Children } ON ROWS
FROM [Finance]
WHERE ( [Dataset].[Actual],  [Time].[&LDATE1.EVAL] , [Site].&|[&SITE.EVAL]) 
');

TABLE ON TABLE HOLD AS MYOUT
END  



"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott