易截截图软件、单文件、免安装、纯绿色、仅160KB

Comparison of SQL and MDX Syntax

          Comparison of SQL and MDX Syntax
The Multidimensional Expressions (MDX) syntax is similar to the syntax of Structured Query Language (SQL). In many ways, the functionality supplied by MDX is also similar to that of SQL; with effort, you can even duplicate some of the functionality provided by MDX in SQL.
However, there are some striking differences between SQL and MDX. Here we provide a guide to these conceptual differences between SQL and MDX, from the perspective of an SQL developer.
Dimensions
The principal difference between SQL and MDX is the ability of MDX to reference multiple dimensions. Although it is possible to use SQL exclusively to query cubes in SQL Server 2000, MDX provides commands that are designed specifically to retrieve data as multidimensional data structures with almost any number of dimensions.
SQL refers to only two dimensions when processing queries: columns and rows. Because SQL was designed to handle only two-dimensional tabular data, the terms "column" and "row" have meaning in SQL syntax.
MDX, in comparison, can process one, two, three, or more dimensions in queries. Each dimension is referred to as an axis. The terms "column" and "row" in MDX are used only as aliases for the first two axis dimensions in an MDX query. Other dimensions are also aliased, but the aliases "column" and "row" hold no meaning to MDX. MDX supports such aliases for display purposes; many OLAP tools are incapable of displaying a result set with more than two dimensions. MDX can even process "zero-axis" queries that return only one cell from a cube, determined by a tuple constructed from the default member of each dimension in the cube.
SELECT and WHERE Clauses
In SQL, the SELECT clause is used to define the column layout for a query, and the WHERE clause is used to define the row layout. However, in MDX the SELECT clause can be used to define several axis dimensions, while the WHERE clause is used to r


相关文档:

用索引提高SQL Server性能

 在微软的SQL Server系统中通过有效的使用索引可以提高数据库的查询性能,但是性能的提高取决于数据库的实现。在本文中将会告诉你如何实现索引并有效的提高数据库的性能。 
  
  在关系型数据库中使用索引能够提高数据库性能,这一点是非常明显的。用的索引越多,从数据库系统中得到数据的速度就越快。然而,需 ......

一条SQL删除所有表中数据

         由于处于系统开发的后期,需要给客户演示。发现大量的表,存在大量的测试数据。需要清除,用“delete from tablename” -->  晕死。后来发现居然有这么强大的东东。 :)
 EXECUTE sp_msforeachtable 'delete from ?' ......

C# SQL数据库操作通用类


C# SQL数据库操作通用类
using System;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Collections;
namespace Framework.DataBase
{
///
/// 通用数据库类
///
public class DataBase
{
private string ConnStr = null;
public DataBase()
{
 &nb ......

SQL Server 中AS的特殊性

 外连接取数据如果为空,不存在AS时可能取到数据,但加了AS就会报错。比如Select Top 10 a.*,b.Class AS ClassId
,b.DeviceName from AuxBusInfo a Left Join  DeviceCandidate b On a.InitialDeviceRscId = b.DeviceRscId Order By AuxBusId,当 ......

Microsoft SQL Server 管理 (常用管理及维护命令)

 --查询当前连接的实例名
select @@servername--察看任何数据库属性
sp_helpdb master
--设置单用户模式,同时立即断开所有用户
alter database Northwind set single_user with rollback immediate--恢复正常
alter database Northwind set multi_user
--察看数据库属性
sp_helpdb--察看数据库恢复模式
selec ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号