[SQL Server2008]MDX º¯Êý²Î¿¼ (MDX)
MDX º¯Êý²Î¿¼
SQL Server 2008 Áª»ú´ÔÊ飨2009 Äê 7 Ô£©
MDX º¯Êý²Î¿¼ (MDX)
Microsoft SQL Server Analysis Services ÔÊÐíÔÚ¶àά±í´ïʽ (MDX) Óï·¨ÖÐʹÓú¯Êý¡£º¯Êý¿ÉÒÔÔÚÈκÎÓÐЧµÄ MDX Óï¾äÖÐʹÓ㬲¢ÇÒ¾³£ÓÃÓÚ²éѯ¡¢×Ô¶¨Òå»ã×ܶ¨ÒåÒÔ¼°ÆäËû¼ÆËã¡£ ±¾½Ú½éÉÜ Analysis Services ¸½´øµÄ MDX º¯Êý¡£
¿ÉÒÔʹÓÃÏÂÃæÕâЩ±í°´·µ»ØÖµµÄÀà±ðÀ´²éÕÒº¯Êý£¬Ò²¿ÉÒÔ´Ó°´×Öĸ˳ÐòÅÅÁеÄĿ¼Öа´Ãû³ÆÀ´Ñ¡Ôñº¯Êý¡£
Êý×麯Êý
º¯Êý ˵Ã÷
SetToArray (MDX)
½«Ò»¸ö»ò¶à¸ö¼¯×ª»»ÎªÊý×飬ÒÔ±ãÔÚÓû§¶¨Ò庯ÊýÖÐʹÓá£
²ã´Î½á¹¹º¯Êý
º¯Êý ˵Ã÷
Hierarchy (MDX)
·µ»Ø°üº¬Ö¸¶¨µÄ³ÉÔ±»ò¼¶±ðµÄ²ã´Î½á¹¹¡£
Dimension (MDX)
·µ»Ø°üº¬Ö¸¶¨µÄ³ÉÔ±¡¢¼¶±ð»ò²ã´Î½á¹¹µÄά¶È¡£
Dimensions (MDX)
·µ»ØÓÉÊýÖµ±í´ïʽ»ò×Ö·û´®±í´ïʽָ¶¨µÄ²ã´Î½á¹¹¡£
¼¶±ðº¯Êý
º¯Êý ˵Ã÷
Level (MDX)
·µ»Ø³ÉÔ±µÄ¼¶±ð¡£
Levels (MDX)
·µ»ØÓÉÊýÖµ±í´ïʽָ¶¨ÁËÔÚά¶È»ò²ã´Î½á¹¹ÖÐλÖõļ¶±ð£¬»ò·µ»ØÓÉ×Ö·û´®±í´ïʽָ¶¨ÁËÃû³ÆµÄ¼¶±ð¡£
Âß¼º¯Êý
º¯Êý ˵Ã÷
IsAncestor (MDX)
·µ»ØÒ»¸öÖ¸¶¨³ÉÔ±ÊÇ·ñΪÁíÒ»¸öÖ¸¶¨³ÉÔ±µÄ×æÏÈ¡£
IsEmpty (MDX)
·µ»Ø±í´ïʽµÄ¼ÆËã½á¹ûÊÇ·ñΪ¿Õµ¥ÔªÖµ¡£
IsGeneration (MDX)
·µ»ØÖ¸¶¨³ÉÔ±ÊÇ·ñ´¦ÓÚÖ¸¶¨µÄ´úÖС£
IsLeaf (MDX)
·µ»ØÖ¸¶¨³ÉÔ±ÊÇ·ñΪҶ³ÉÔ±¡£
IsSibling (MDX)
·µ»ØÒ»¸öÖ¸¶¨³ÉÔ±ÊÇ·ñΪÁíÒ»¸öÖ¸¶¨³ÉÔ±µÄͬ¼¶³ÉÔ±¡£
³ÉÔ±º¯Êý
º¯Êý ˵Ã÷
Ancestor (MDX)
·µ»Øij¸ö³ÉÔ±ÔÚÖ¸¶¨¼¶±ð»ò¾àÀëÉϵÄ×æÏÈ¡£
ClosingPeriod (MDX)
·µ»Øij¸ö³ÉÔ±ÔÚÖ¸¶¨¼¶±ðÉϵĺó´úÖеÄ×îºóÒ»¸öͬ¼¶¡£
Cousin (MDX)
·µ»ØÓëÖ¸¶¨µÄ×Ó³ÉÔ±ÔÚ¸¸³ÉԱϷ½¾ßÓÐÏàͬµÄÏà¶ÔλÖõÄ×Ó³ÉÔ±¡£
CurrentMember (MDX)
·µ»Øµü´ú¹ý³ÌÖÐÖ¸¶¨µÄά¶È»ò²ã´Î½á¹¹µÄµ±Ç°³ÉÔ±¡£
DataMember (MDX)
·µ»ØϵͳÉú³ÉµÄ¡¢Óëij¸öά¶ÈµÄ·ÇÒ¶³ÉÔ±Ïà¹ØÁªµÄÊý¾Ý³ÉÔ±¡£
DefaultMember (MDX)
·µ»Øά¶È»ò²ã´Î½á¹¹µÄĬÈϳÉÔ±¡£
FirstChild (MDX)
·µ»Ø³ÉÔ±µÄµÚÒ»¸ö×Ó³ÉÔ±¡£
FirstSibling (MDX)
·µ»Ø³ÉÔ±µÄ¸¸³ÉÔ±µÄµÚÒ»¸ö×Ó³ÉÔ±¡£
Item£¨³ÉÔ±£©(MDX)
·µ»ØÖ¸¶¨Ôª×éÖеijÉÔ±¡£
Lag (MDX)
·µ»ØÔÚËùÔÚά¶ÈÖÐλÖñÈÖ¸¶¨³ÉÔ±¿¿Ç°ÇÒ¿¿Ç°Î»ÊýΪָ¶¨Î»ÊýµÄ³ÉÔ±¡£
LastChild (MDX)
·µ»ØÖ¸¶¨³ÉÔ±µÄ×îºóÒ»¸ö×Ó³ÉÔ±¡£
LastSibling (MDX)
·µ»ØÖ¸¶¨³ÉÔ±µÄ¸¸³ÉÔ±µÄ×îºóÒ»¸ö×Ó³ÉÔ±¡£
Lead (MDX)
·µ»ØÔÚËùÔÚά¶ÈÖÐλÖñÈÖ¸¶¨³ÉÔ±¿¿ºóÇÒ¿¿º
Ïà¹ØÎĵµ£º
¸ø´ó¼Ò¸öѧϰÊý¾Ý¿âµÄÈí¼þ°É£¬sql server 2008£¬Õâ¸öÊÇ΢Èí¹«Ë¾µÄ×÷Æ·£¬²»´í£¬Ó¦¸ÃÊǷdz£²»´í£¬ÔÚµçÄÔÉÏ°²×°OracleÊý¾Ý¿âµÄ»°£¬ÄǸö±È½Ï´ó£¬¶øÇÒÔÚÍøÉÏÒ²²»ºÃÏÂÔØ£¬ÒªÊÇÁ¬½Óµ½Ñ§Ð£·þÎñÆ÷µÄ»°£¬Ò²ÊDz»¿ÉÄܵģ¬³ý·Ç´ó¼Ò¾³£È¥»ú·¿ÉÏ»ú£¬µ«ÊÇÄǸöÒ²²»¿ª£¬·Ï»°²»¶à˵ÁË£¬´ó¼Òȥ΢Èí¹ÙÍøÏÂÔØÒ»¸ösql server 2008µÄÊÔÓðæµÄ°²×°ÎÄ ......
ÏÂÁÐÓï¾ä²¿·ÖÊÇMssqlÓï¾ä£¬²»¿ÉÒÔÔÚaccessÖÐʹÓá£
SQL·ÖÀࣺ
DDL—Êý¾Ý¶¨ÒåÓïÑÔ(CREATE£¬ALTER£¬DROP£¬DECLARE)
DML—Êý¾Ý²Ù×ÝÓïÑÔ(SELECT£¬DELETE£¬UPDATE£¬INSERT)
DCL—Êý¾Ý¿ØÖÆÓïÑÔ(GRANT£¬REVOKE£¬COMMIT£ ......
×î½üÓöµ½Ò»¸öÏîÄ¿£¬¿Í»§ÔÚ×ܲ¿Â¼ÈëÐÅÏ¢ºó£¬Êý¾ÝÐèҪͬ²½µ½ÏÂÊôµÄÈô¸É¸ö×ÓϵͳÖС£ÏÖÔÚ×ܲ¿µ¥¶ÀʹÓÃÒ»¸öÊý¾Ý¿â£¬ÏÂÊôµ¥Î»¸÷×ÔʹÓÃ×Ô¼ºµÄÊý¾Ý¿â¡£
¶ÔÓÚÕâ¸öÎÊÌ⣬Ïëµ½Á˼¸¸ö½â¾ö·½°¸£º
1¡¢×Ô¼ºÐ´´úÂë½â¾ö¡£¶¨ÒåºÃ·ÃÎÊÿ¸öÊý¾ ......
1. ¸´ÖƱí½á¹¹
Sql´úÂë
1. select * into B from A where 1=0;
select * into B from A where 1=0;
2.¸´ÖƱí¼Ç¼ ¸´ÖÆijЩ×Ö¶Î
Sql´úÂë
1. insert into B(a, b, c) select d, e, f from A;
insert into B(a, b, c) select d, e, f from A;
¸´Ö ......
ÕâÊÇCSDNÂÛ̳ÀïÃæµÄÒ»¸öÌû×Ó£¬×÷ÕßÊÇ°®Ð¾õÂÞ.ع»ª¡£¸Ð¾õ±È½ÏÈ«Ã棬¾ÍÕûÀíÏÂÀ´ÁË£¬Áô×÷ÒÔºó²Î¿¼±¸Óá£ÔÚ´Ë£¬Ôڴ˸Ðл±¾ÎĵÄ×÷Õß¡£
/*
±êÌ⣺һ¸öÏîÄ¿Éæ¼°µ½µÄ50¸öSqlÓï¾ä(ÕûÀí°æ)
×÷Õߣº°®Ð¾õÂÞ.ع»ª(Ê®°ËÄê·çÓ꣬ÊصñùɽѩÁ«»¨¿ª)
ʱ¼ä£º2010-05-10
µØµã£ºÖØÇ캽ÌìְҵѧԺ
˵Ã÷£ºÒÔÏÂÎåÊ®¸öÓï¾ä¶¼°´ÕÕ²âÊÔÊý¾Ý½øÐ ......