Query issues - what is the difference?


the query below used work (deepak helped out) after enhanced clause parser throws fit.

 

code snippet

select {
[measures].[dt_sporadicfactor],
[measures].[maxnumterms],
[measures].[timewgt],
[measures].[lst 5p savings],
[measures].[lst 5p savingsnet]} on columns ,


non empty crossjoin(
{[dim dmdunit].[dmdunit].children},
{[dim dmdgroup].[dmdgroup].children},
{[dim loc].[loc].children})

having ([lst 5p savingsnet] > 0) , [maxnumterms]>1

on rows  (select ({[dim dmdunit].[dmdunit].children})

on columns 

from [multi-month  analysis]

where
(
[dim importmonth].[importmonth].&[200802],
[dim dmdgroup].[bu].&[refinish],
[dim lag].[lag].&[1]
)

 

 

the best work this.

 

code snippet

select {
[measures].[dt_sporadicfactor],
[measures].[maxnumterms],
[measures].[timewgt],
[measures].[lst 5p savings],
[measures].[lst 5p savingsnet]} on columns ,


non empty crossjoin
(
{[dim dmdunit].[dmdunit].children},
{[dim dmdgroup].[dmdgroup].children},
{[dim loc].[loc].children}
)

having ([lst 5p savingsnet] > 0) , ([maxnumterms]>1)

on rows

from [multi-month  analysis]

where
(
[dim importmonth].[importmonth].&[200802],
[dim dmdgroup].[bu].&[refinish],
[dim lag].[lag].&[1]
)

 

 

can me understand difference , mistake made.

 

thanks , regards,

dirk

hi dirk,

 

what parser error you're getting 1st query? also, purpose of subselect clause:

 

select ({[dim dmdunit].[dmdunit].children})

on columns



SQL Server  >  SQL Server Analysis Services



Comments

Popular posts from this blog

Motherboard replacement

Cannot create Full Text Search catalog after upgrading to V12 - Database is not fully started up or it is not in an ONLINE state

Remote Desktop App - Error 0x207 or 0x607