mdx create set using openquery -
06-02-2005
, 10:02 AM
Please may I have your assistance. I tried the following.
select * from
openquery(aaiLinkServerdev2_nv_daily,"create set [aaiApplication_day]
..JSTestaaiRAApps as 'NONEMPTYCROSSJOIN([application].[Appl Id].MEMBERS, {
[Location].[All Location].[108]}, 1)' ")
gave me the following error
Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'MSOLAP' reported an error. Command was not prepared.
OLE DB error trace [OLE/DB Provider 'MSOLAP' IColumnsInfo::GetColumnsInfo
returned 0x80040e4a: Command was not prepared.].
I need to be able to create a session level set in AS. My next objective
was to test if I can still query using this set via another openquery
command. I'm expecting this is unlikely because the openquery closes the
session. However I'm not entirely sure
When I run the following it works ok
select * from
openquery(aaiLinkServerdev2_nv_daily,"with set JSTestaaiRAApps as
'NONEMPTYCROSSJOIN([application].[Appl Id].MEMBERS, {[Location].[All
Location].[108]}, 1)' select {[measures].bytes} on 0, {JSTestaaiRAApps} on
1 from aaiApplication_day ")
Unfortunately my MDX queries can be extremely large more than 8000 chars
which is the limit using openquery hence the reason why I'm attempting to
create the sets and members using seperate calls to openquery.
Any help would be greatly appreciated
Thanks
--
Message posted via http://www.sqlmonster.com |