dbTalk Databases Forums  

Extracting first month

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Extracting first month in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Denver
 
Posts: n/a

Default Extracting first month - 12-20-2005 , 08:46 AM






I have this qry

WITH
SET [LatestMonth] AS
'TAIL(NONEMPTYCROSSJOIN([Time].[Standard].[Month].Members,
{[Country].[Country].[Bahrain]}, 1), 1)'
SELECT
{[Measures].[Coverage]} ON 0,
CROSSJOIN({[Country].[Country].[Bahrain]}, [LatestMonth]) ON 1
FROM [Cross Country]

This succesfully gets me the last month, what can I do to get the first
month. (i.e. the opposite to tail)

Thanks

Denver


Reply With Quote
  #2  
Old   
Paul
 
Posts: n/a

Default RE: Extracting first month - 12-20-2005 , 11:26 AM






Hi Denver,
The Function opposite to TAIL is HEAD.
Ta
Paul

"Denver" wrote:

Quote:
I have this qry

WITH
SET [LatestMonth] AS
'TAIL(NONEMPTYCROSSJOIN([Time].[Standard].[Month].Members,
{[Country].[Country].[Bahrain]}, 1), 1)'
SELECT
{[Measures].[Coverage]} ON 0,
CROSSJOIN({[Country].[Country].[Bahrain]}, [LatestMonth]) ON 1
FROM [Cross Country]

This succesfully gets me the last month, what can I do to get the first
month. (i.e. the opposite to tail)

Thanks

Denver



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.