튜플 함수 사용Using Tuple Functions

이 항목은 다음에 적용됩니다. 예SQL Server(2008부터)예Azure SQL Database예Azure SQL Data Warehouse 예병렬 데이터 웨어하우스 THIS TOPIC APPLIES TO: yesSQL Server (starting with 2008)yesAzure SQL DatabaseyesAzure SQL Data Warehouse yesParallel Data Warehouse

튜플 함수는 집합에서 튜플을 검색하거나 튜플의 문자열 표현을 확인하여 튜플을 검색합니다.A tuple function retrieves a tuple from a set or retrieves a tuple by resolving the string representation of a tuple.

튜플 함수는 멤버 함수 및 집합 함수와 마찬가지로 Analysis ServicesAnalysis Services에서 사용되는 다차원 구조를 처리하는 데 필수적입니다.Tuple functions, like member functions and set functions, are essential to negotiating the multidimensional structures found in Analysis ServicesAnalysis Services.

세 가지 튜플 함수가 mdx에서 현재 ( Mdx) , 항목 ( 튜플 ) ( Mdx) StrToTuple ( Mdx) .There are three tuple functions in MDX, Current (MDX), Item (Tuple) (MDX) and StrToTuple (MDX). 다음 예제 쿼리에서는 이러한 각 튜플 함수를 사용하는 방법을 보여 줍니다.The following example query shows how to use of each of them:

WITH

//Creates a set of tuples consisting of Years and Countries

SET MyTuples AS [Date].[Calendar Year].[Calendar Year].MEMBERS * [Customer].[Country].[Country].MEMBERS

//Returns a string representation of that set using the Current and Generate functions

MEMBER MEASURES.CURRENTDEMO AS GENERATE(MyTuples, TUPLETOSTR(MyTuples.CURRENT), ", ")

//Retrieves the fourth tuple from that set and displays it as a string

MEMBER MEASURES.ITEMDEMO AS TUPLETOSTR(MyTuples.ITEM(3))

//Creates a tuple consisting of the measure Internet Sales Amount and the country Australia from a string

MEMBER MEASURES.STRTOTUPLEDEMO AS STRTOTUPLE("([Measures].[Internet Sales Amount]" + ", [Customer].[Country].&[Australia])")

SELECT{MEASURES.CURRENTDEMO,MEASURES.ITEMDEMO,MEASURES.STRTOTUPLEDEMO} ON COLUMNS

FROM [Adventure Works]

관련 항목:See Also

함수 ( MDX 구문 ) Functions (MDX Syntax)
멤버 함수를 사용 하 여 Using Member Functions
집합 함수 사용Using Set Functions