1

Topic: Line of characters

Hello!
There is a SQL query with OpenRowset which is connected to OLAP. But it is not launched, the line of characters which begins with "SELECT writes"
{[Measures]. [Shipments ];
[Measures]. [Resets ],
[Measures]. [Implementation ", - too long. The maximum length makes 8000."
How it is possible to increase length?

2

Re: Line of characters

Proceeding from that piece of request that you resulted... To try to use named sets, for example.

3

Re: Line of characters

[spoiler a SQL query]

SELECT
CAST (F1. "[Shops]. [The TT Code]. [The TT Code]. [MEMBER_CAPTION]" AS VARCHAR (20)) AS [the TT Code];
CAST (F1. "[Production]. [Production Code]. [Production Code]. [MEMBER_CAPTION]" AS VARCHAR (20)) AS [production Code],
CONVERT (nvarchar (10), F1. "[Time]. [Date]. [Date]. [MEMBER_CAPTION]", 104) AS [Date];
F1. "[Measures]. [Shipments ]" AS [Shipments ];
F1. "[Measures]. [Resets ]" AS [Resets ],
F1. "[Measures]. [Implementation ]" AS [Implementation ]
FROM OPENROWSET (
' MSOLAP ';
' Provider=MSOLAP.3;... ';
' SELECT
{[Measures]. [Shipments ];
[Measures]. [Resets ],
[Measures]. [Implementation ]}
ON 0;
NON EMPTY
[Shops]. [The TT Code]. [The TT Code] *
[Production]. [Production Code]. [Production Code] *
[Time]. [Date]. [Date]
ON 1
FROM
(SELECT
([Time]. [Date] .& [2017-07-01T00:00:00]: [Time]. [Date] .& [2018-03-11T00:00:00],
>>> {[Shops]. [The TT Code] .& [00001], [Shops]. [The TT Code] .& [00002], [Shops]. [The TT Code] .& [00003], [Shops]. [The TT Code] .& [000004], <<<
>>>... <<<
>>> [Shops]. [The TT Code] .& [00197], [Shops]. [The TT Code] .& [00198], [Shops]. [The TT Code] .& [00199], [Shops]. [The TT Code] .& [00200]} <<<
) ON 0
FROM PROFIT)'
) AS F1

[/spoiler]
In MDX-inquiry it is necessary to write the big list of a TT as this list has general sign.

4

Re: Line of characters

wrote:

proceeding from that piece of request that you resulted... To try to use named sets, for example.

The concrete set will not work in a subcube

5

Re: Line of characters

ferzmikk wrote:

the Concrete set will not work in a subcube

in your first post of anything about subcubes is not present.
- To form all request dynamics in a variable (max) and further exec
- To refuse from openrowset and to pass on exec at (as through a variable max)