473,657 Members | 2,825 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Probem in executing a long Dynamic MDX from SQL server

Hi ,
What i exacly want to do is

1. Connect to OLAP server from my Sql server using following query
string

'SELECT a.* FROM
OpenRowset(''MS OLAP'',''DATASO URCE="RAPID-CHRISTUS"; Initial
Catalog="MRS";

2. I want to execute my dynamically created MDX query . This query can
be greater than 8000 varchar limit.
When my query length exceeds 8000 length i break it up into 2 parts
..Here I have broken my query into 2 parts

@mdx1 and @mdx2

Now i execute the entire statement as

exec('SELECT a.* FROM
OpenRowset(''MS OLAP'',''DATASO URCE="RAPID-CHRISTUS"; Initial
Catalog="MRS";' ',' + @mdx1 + mdx2 ') as ' )

Still error comes that :
Unclosed quotation mark before the character string 'WITH MEMBER ..

('With member' is the starting statement of my MDX query)

Is there any other way to connect to OLAP server and execute an MDX
statement with a Length greater than 8000 chars

TIA

May 22 '06 #1
1 2438
(ag***********@ gmail.com) writes:
Now i execute the entire statement as

exec('SELECT a.* FROM
OpenRowset(''MS OLAP'',''DATASO URCE="RAPID-CHRISTUS"; Initial
Catalog="MRS";' ',' + @mdx1 + mdx2 ') as ' )

Still error comes that :
Unclosed quotation mark before the character string 'WITH MEMBER ..

('With member' is the starting statement of my MDX query)

Is there any other way to connect to OLAP server and execute an MDX
statement with a Length greater than 8000 chars


Have a look at http://www.sommarskog.se/dynamic_sql.html#OPENQUERY
for some tips.
--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
May 22 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1660
by: aurora | last post by:
I am looking for a way for reloading updated modules in a long running server. I'm not too concerned about cascaded reload or objects already created. Just need to reload module xxx if the corresponding xxx.py is updated. I found something useful in module.__file__. Would it work if I use it to generate filenames xxx.py xxx.pyc and then compare their mtime? I'm not too sure about the mechanism of generation of .pyc file. Would it be too...
13
2838
by: BK | last post by:
Can someone point me to a code sample that illustrates executing long running tasks (asynchronous) from a web application in ASP.NET? I assume that Web Services might come into play at some point, but I'm not sure how to get started. For example, I have an application that, upon a user initiating through a button or link click, will go out and generate a bunch of files (this could take several minutes). This will happen in batches, so I...
0
1465
by: tukaram.thatikonda | last post by:
Hi Guys, I have written a small windows application in VB.Net to test ADO.Net performance while executing long running query. The query works most of the time but fails sometime. I am trying to connect DB2 using federated database. The query returns around 25K records from a total count of 10 million records based on criteria. It takes roughly 20 mins to complete whenever the query works.
1
2458
by: | last post by:
Hi Guys, I am generating dynamic server controls using XML and XSLT. With this I am generating two buttons which when clicked redirect the page to a different page. Here is my "checkout" button which is generated dynamically looks something like this <input type="image" name="checkout" id="checkout"
0
1222
by: ferdinandloius | last post by:
'IBM and AGS Ltd., a privately held purveyor of management solutions for data servers, announced that the new Server Studio and Sentinel R. 6.1 -- the principal suite of integrated system management tools for IBM Informix Dynamic Server (IDS) -- is now available, with editions offered by both IBM and AGS.' I saw the details at http://theanalystmagazine.com/pr/804.htm
0
8403
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8833
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8737
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8509
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8610
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7345
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5636
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2735
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1967
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.