How to create stored procedure

Hi,


I had created a stored procedure using SQL and it run well. But when I drag into a blank data cube, an error message pop up saying "The element name cannot be empty or null".

Not sure the "element" refers to what???


Thank you.

Could you be a bit more specific? maybe share the SQL code (or something similar to it)?

prn_GetCostPerMember.txt


Hi Elia,

Attached here with my SQL script.

Thanks.

Try changing


SELECT SUM(#tblCost.CPMPA)

FROM #tblCost


To something like


SELECT SUM(#tblCost.CPMPA) AS [SUM_CPMPA]

FROM #tblCost

Hi Elia,


Yes, it works!!! Million Thanks.