dbTalk Databases Forums  

Concatinating Dates

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


Discuss Concatinating Dates in the microsoft.public.sqlserver.olap forum.



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

Default Concatinating Dates - 12-21-2005 , 06:17 AM






I have this Query

WITH
SET [LatestMonth] AS
'TAIL(NONEMPTYCROSSJOIN([Time].[Standard].[Month].Members,
{[Country].[Country].[Bahrain]}, 1), 1) + " " +
HEAD(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]

However it gives me 2 rows of data, the top row with teh last month
(i.e. Oct 04/05) and the bottom row with the first month (i.e. Oct
01/02)

I would like it to be all on one row so that the month column would
read "Oct 01/02 Oct 04/05"

I know I may have to convert it to string but everytime I try and do it
it fails

Any ideas


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.