Skip to Content
-1

Supress Location Value

Hi Expert,

please guide me, how it is possible in hana/SQL

My requirement is row wise data suppress in one line if Date is same.

Query:

SELECT
( T0.U_UNE_LNNO )AS "Line No",
(t0."U_UNE_ITCD") as "U_UNE_ITCD",
(t0."U_UNE_ITNM") AS "U_UNE_ITNM",
(T0.U_UNE_SMDT) AS "SampleDate",

IFNULL((SELECT
IFNULL(t1."U_UNE_STRS",'')
FROM "@UNE_QCCHECKDET" t1
inner JOIN "@UNE_QCCHECKHED" T3 ON T3."DocEntry" = T1."DocEntry"
WHERE t1."DocEntry" = t0."DocEntry"
AND t1.U_UNE_PNAM ='pH' and t3."U_UNE_SMPT"='PW-01'),
'') AS "PW-01",

IFNULL((SELECT
IFNULL(t1."U_UNE_STRS",'')
FROM "@UNE_QCCHECKDET" t1
inner JOIN "@UNE_QCCHECKHED" T3 ON T3."DocEntry" = T1."DocEntry"
WHERE t1."DocEntry" = t0."DocEntry"
AND t1.U_UNE_PNAM ='pH' and t3."U_UNE_SMPT"='PW-02'),
'') AS "PW-02",

IFNULL((SELECT
IFNULL(t1."U_UNE_STRS",'')
FROM "@UNE_QCCHECKDET" t1
inner JOIN "@UNE_QCCHECKHED" T3 ON T3."DocEntry" = T1."DocEntry"
WHERE t1."DocEntry" = t0."DocEntry"
AND t1.U_UNE_PNAM ='pH' and t3."U_UNE_SMPT"='PW-03'),
'') AS "PW-03",
IFNULL((SELECT
IFNULL(t1."U_UNE_STRS",'')
FROM "@UNE_QCCHECKDET" t1
inner JOIN "@UNE_QCCHECKHED" T3 ON T3."DocEntry" = T1."DocEntry"
WHERE t1."DocEntry" = t0."DocEntry"
AND t1.U_UNE_PNAM ='pH' and t3."U_UNE_SMPT"='PW-04'),
'') AS "PW-04"


FROM "@UNE_QCCHECKHED" T0
inner JOIN "@UNE_QCCHECKDET" T3 ON T0."DocEntry" = T3."DocEntry"

WHERE t0."Canceled" <>'Y'
and t0."U_UNE_ITCD"='1010100097'
AND T3."U_UNE_PNAM" = 'pH'
AND T0.U_UNE_SMDT >= '20180228'

Thanks

Danish

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers