Wrox Home  
Search P2P Archive for: Go

  Return to Index  

sql_language thread: how to create procedure using mdx query with member


Message #1 by "syed shah quader qadri" <ssqadir@y...> on Mon, 28 Oct 2002 22:28:32
I am trying to create a procedure  for the following mdx query

With 
member [measures].[count] as 
'count({descendants([Customers].[USA],[Customers].[Name], self) })' /* 
also use combination with 'self_and_before' */
select {[measures].[store sales],[measures].[store cost],[measures].
[count]} on columns,
{[time].[1],[time].[2]} on rows from sales' 

create procedure test_proc as

select * from openquery(eds1,'With 
member [measures].[count] as 
'count({descendants([Customers].[USA],[Customers].[Name], self) })
select {[measures].[store sales],[measures].[store cost],[measures].
[count]} on columns,
{[time].[1],[time].[2]} on rows from sales'

however i am getting an error as

[Microsoft][ODBC SQL Server Driver]Syntax error or access violation

if anyone knows the solution, pls let me know

thanks,
qadri

  Return to Index