Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3523

Rows count mismatch between sap HANA and Sql after execution of select statement

$
0
0

Hello experts,

 

Below is the select statement that i executed in hana

 

SELECT M."REGION", SA."GroupName", SA."Yr", SA."Qtr", SA."Mth", SA."Lvl", SA."MetricValue2", SS."MetricValue"

        FROM "JIVE"."TBL_MKT_SNUG_SIG_METRICS_ACTIVE" SA

        LEFT OUTER JOIN "JIVE"."TBL_MKT_SNUG_SIG_METRICS" SS

        ON SS."GroupName" = SA."GroupName"

        AND SS."Yr" = SA."Yr"

        AND SS."Qtr" = SA."Qtr"

        AND SS."Mth" = SA."Mth"

        AND SS."Lvl" = SA."Lvl"

        INNER JOIN "JIVE"."TBL_MKT_SNUG_SIG_MAP" M ON SS."GroupName" = M.SNUG_SIG_GROUP AND M."REGION" <> 'SIG'

 

corresponding output is giving me 708 rows which is shown in the attachment

 

Below is the sql query i execute in sql server

 

SELECT  M.Region, SA.GroupName,SA.Yr,SA.Qtr,SA.Mth,SA.Lvl,SA.MetricValue2,SS.MetricValue

            FROM MARKETING.dbo.TBL_MKT_SNUG_SIG_METRICS_ACTIVE SA

            LEFT OUTER JOIN  MARKETING.dbo.TBL_MKT_SNUG_SIG_METRICS SS

            ON  SS.[GroupName] = SA.[GroupName]

            AND SS.[Yr]  = SA.[Yr]

            AND SS.[Qtr] = SA.[Qtr]

            And SS.[Mth] = SA.[Mth]

            AND SS.[Lvl] = SA.[Lvl]

            INNER JOIN MARKETING.dbo.TBL_MKT_SNUG_SIG_MAP M ON SS.[GroupName] = M.SNUG_SIG_GROUP AND M.REGION <> 'SIG'

 

corresponding output is giving me 2144 rows

 

here basically there are 3 tables that are used in the above query

 

TBL_MKT_SNUG_SIG_METRICS_ACTIVE  row count  = 2956 both in HANA and SQL

TBL_MKT_SNUG_SIG_METRICS  row count = 2474 both in HANA and SQL

TBL_MKT_SNUG_SIG_MAP row  count = 78 both in HANA and SQL

 

Can anyone please guide me why there is a mismatch in the row count after the execution of select statement  both in HANA and   SQL

 

Regards

Naresh P


Viewing all articles
Browse latest Browse all 3523

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>