my query result will be given below.i want to get result like Marked one.
in 2025 no data for Query,ABC company .so i want to display it as Pening in next row

my query result will be given below.i want to get result like Marked one.
in 2025 no data for Query,ABC company .so i want to display it as Pening in next row

Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Tuhin PaulPosted Jan 17, 2025, 6:05 PM
You can join the
Tablewith theMessagestable to check that all rows from theTableare included, and for the missing rows (where no match is found in theMessagestable), display "Pending". This avoids hardcoding specific conditions. If you’re missing data in theMessagestable (for a specificOrgIDandYear), you can handle it withCOALESCEorIFNULLto substitute a "Pending" value for the missing data.Tuhin PaulPosted Jan 17, 2025, 6:03 PM
check with something like this query.
Compare your query result with a reference table that contains the expected entries for each year and name (e.g., the
Messagestable). If data is missing for a given year and organization (like ABC company in 2025), you can show "Pending" in that row.