![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| ||||
| ||||
|
| strSource = " 'with ...' |
| Newsgroups: microsoft.public.sqlserver.olap |
|
-----Original Message----- Hello, the following MDX fails: The error comes because the uniquename is ..year's] With member [measures].[abc] as 'count(descendants([category]*.[all Category].[current year's].[actuals],,leaves))' How can i write a valid mdx? Thanks for reading this J鰎g . |
#3
| |||
| |||
|
|
You need to double up quotation marks within quotes: strSource = " 'with ...' Select {[Programa].[Sigla].[Todos os Programas].[Ajudar ''A INDUSTRIA], [Programa].[Sigla].[Todos os Programas].[APOIO A PROJ SOCIAL],[Programa]. [Sigla].[Todos os Programas].[APOIO ENSINO SUPERIO]} on rows,{[Measures].[Libera??es]} ON COLUMNS FROM [dwe_cubo_pird] CELL PROPERTIES FORMATTED_VALUE, BACK_COLOR, FORE_COLOR" Here's an earlier thread that discusses this: http://groups-beta.google.com/group/...rver.olap/msg/ 5b1f83a30f0203eb Newsgroups: microsoft.public.sqlserver.olap From: "George Spofford" Date: Sat, 1 Jun 2002 07:33:16 -0700 Subject: MDX Error with Current Year's One of those silly things: double it up inside. With member [measures].[abc] as 'count(descendants([category].-[all Category].[current year''s].[actuals],,leaves))' HTH -- George Spofford Microsoft MVP Chief Architect / OLAP Solution Provider DSS Lab http://www.dsslab.com geo... (AT) dsslab (DOT) com ISVs & IT organizations: Find out how DSS Lab can speed your development! -----Original Message----- Hello, the following MDX fails: The error comes because the uniquename is ..year's] With member [measures].[abc] as 'count(descendants([category]-.[all Category].[current year's].[actuals],,leaves))' How can i write a valid mdx? Thanks for reading this Jvrg . - Deepak Deepak Puri Microsoft MVP - SQL Server *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#4
| |||
| |||
|
#5
| |||
| |||
|
|
Maybe you used double-quote characters (Ascii 34), instead of 2 single-quote characters (Ascii 39) - that's the only way I could create the error message you got? - Deepak Deepak Puri Microsoft MVP - SQL Server *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#6
| |||
| |||
|
|
I didn't use double-quote characters (Ascii 34). I duplicate the ' in the string, but it didn't work. I have to repair this error fast. It's crucial for my application to repair this problem. I used: STRING_mdx.replace(/\'/mig,"''"); ERROR p>Microsoft庐 OLE DB Provider for Analysis Services</font> <font face="Arial" size=2>error '80040e14'</font p font face="Arial" size=2>Formula error - cannot find dimension member ("[Programa].[C贸dSigla].[Todos os Programas].[010001 - APOIO ''A INDUSTRIA]") - in a name-binding function</font p font face="Arial" size=2>/Server_1.asp</font><font face="Arial" size=2>, line 520</font I'm waiting for a solution. "Deepak Puri" wrote: Maybe you used double-quote characters (Ascii 34), instead of 2 single-quote characters (Ascii 39) - that's the only way I could create the error message you got? - Deepak Deepak Puri Microsoft MVP - SQL Server *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#7
| |||
| |||
|
#8
| |||
| |||
|
|
I think your problem is the fact you wrap the WITH keyword with single quotes ('). There really shouldn't be a problem with using single quotes in names of members, unless you use them in calculation value declarations, in which case you have to use double single quotes (''). Instead of: strSource = " 'with ...' Select {[Programa].[Sigla].[Todos os Programas].[Ajudar 'A INDUSTRIA], [Programa..." try: strSource = " with ... ' <your calculation value here> '" + "Select {[Programa].[Sigla].[Todos os Programas].[Ajudar 'A INDUSTRIA], [Programa..." *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#9
| |||
| |||
|
|
I think your problem is the fact you wrap the WITH keyword with single quotes ('). There really shouldn't be a problem with using single quotes in names of members, unless you use them in calculation value declarations, in which case you have to use double single quotes (''). Instead of: strSource = " 'with ...' Select {[Programa].[Sigla].[Todos os Programas].[Ajudar 'A INDUSTRIA], [Programa..." try: strSource = " with ... ' <your calculation value here> '" + "Select {[Programa].[Sigla].[Todos os Programas].[Ajudar 'A INDUSTRIA], [Programa..." *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#10
| |||
| |||
|
| with member [Programa].[C贸dSigla].[Todos os Programas].[Sub Total] AS |
![]() |
| Thread Tools | |
| Display Modes | |
| |