Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone,
I've one question. Actually, I have a table in which there are two columns that I need to add to the main table by doing a left join. But the key I made has some row frequency as (2).
Temp:
LOAD
"DLR_NO",
"SVY_RST_NO",
"SVY_TMPL_NO",
"SVY_TYPE",
"SVY_NO",
DATE(DATE#("SVY_DATE",'YYYYMMDD'),'DD/MM/YYYY') AS Svy_date,
ROUND(("SVY_FINAL_SCORE") /7) AS Final_Score,
"SVY_EQRY_NO";
SQL SELECT "DLR_NO",
"SVY_RST_NO",
"SVY_TMPL_NO",
"SVY_TYPE",
"SVY_NO",
"SVY_DATE",
"SVY_FINAL_SCORE",
"SVY_EQRY_NO"
FROM DMSDBA."CRM_SVYCST_TB";
FEEDBACK:
load *,
"DLR_NO" & '|' & "SVY_EQRY_NO" AS key
RESIDENT Temp
WHERE "SVY_TYPE"='27'
AND "SVY_TMPL_NO"='51'
AND "SVY_NO"='SV20210902'
;
DROP TABLE Temp;
EXIT SCRIPT;
and here is the output which I need to fix to get the correct data.
How can I make this frequency a single 1? I can't use any other columns to make the key as in the main table, only dlr no. and enquiry no is present.
Hi
but do you have duplicates in your key columns?
and one more reason could be.. the other fields related values are two for those key fields.
And try to remove one one field to check which field is having two count aswell. so that you will come to know.
distinct function is not working in this and it's not duplicated because it is making a unique key with RST_no Column. And the business requirement is that it should show 1 result for particular key.
try to do other steps which i mentioned above
What is the output you expecting for?