Home > Archive > MS SQL Server OLAP > December 2005 > Concatinating Dates









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Concatinating Dates
Denver

2005-12-21, 7:23 am

I have this Query

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

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com