Home      Functions     Common Solutions      Contact     






MDX Functions:
 
MDX Functions

 
Common Solutions

Common Solutions
 
Resource Links

MDX Books
MDX Related Software
MDX Related Blogs
 
Other Links

Contact Us
 
Microsoft SQL Server Analysis Services Function Page
Function Name: Error
Category: Other
Description: The Error function raises an error. You can optionally specify an error message.
Syntax: ERROR(«Error Text»)
Technet Link: MDX Error Function




The query below returns returns an error without a error message.
 
WITH
      MEMBER [Measures].[MyErr] AS
      ERROR()
SELECT
      {[Measures].[MyErr]} ON COLUMNS
     
FROM
      [Adventure Works]
 
 

 
The query below returns returns an error with a custom error message.
 
WITH
      MEMBER [Measures].[MyErr] AS
      ERROR("This is a custom error message!")
SELECT
      {[Measures].[MyErr]} ON COLUMNS
     
FROM
      [Adventure Works]
 
 

 
 

 
Copyright 2008 by MDXpert.com.
 
Terms of Use                              Privacy Statement
 
Site Powered By - WinHost.Com