Thankyou Florian,
but i have reqiuement like i have to convert ms sql script to hana sql script.
below is the ms sql script
SELECT sum(MetricValue) MV,[u_month_begin_date],mth
FROM MARKETING.dbo.TBL_MKT_SNUG_SIG_METRICS SS
INNER JOIN MARKETING.dbo.TBL_MKT_SNUG_SIG_MAP M ON SS.[GroupName] = M.SNUG_SIG_GROUP AND M.REGION = 'SIG'
INNER JOIN Sales.dbo.T_PL_DATE_DIMENSION ON YR=[u_year_num] AND rtrim(ltrim(substring(mth,PATINDEX('%-%',mth)+1,10)))=[u_month_name]
WHERE lvl='M' --and [u_month_begin_date]='2014-01-01'
AND [u_day_num_of_month]='1'
AND GroupName not in('SNUG Advisory Board','SNUG Leaders')
GROUP BY [u_month_begin_date],mth
and the output is shown below
below is the hana sql script
SELECT SUM("MetricValue") AS "MV", u_month_begin_date, "Mth"
FROM "MARKETING"."MSSQL_Marketing_TBL_MKT_SNUG_SIG_METRICS" SS
INNER JOIN "MARKETING"."MSSQL_Marketing_TBL_MKT_SNUG_SIG_MAP" M ON SS."GroupName" = M.SNUG_SIG_GROUP AND M."REGION" = 'SIG'
INNER JOIN "SALES"."T_PL_DATE_DIMENSION" ON "Yr" = u_year_num AND
rtrim(ltrim(substring("Mth", LOCATE('%-%', "Mth") + 1, 10))) = 'u_month_name'
WHERE "Lvl" = 'M' AND u_day_num_of_month = '1' AND "GroupName" NOT IN ('SNUG Advisory Board','SNUG Leaders')
GROUP BY U_MONTH_BEGIN_DATE, "Mth"
NOTE: OUPUT OF BOTH SQL , HANA IS SHOWN IN ATTACHMENT BELOW, PLEASE HAVE A LOOK AND LET ME KNOW THE REASON
Regards
Naresh P