Created 07-13-2021 12:00 AM
Hello Team,
can you please advise how to replace nulls by a default value?
select concat(cast(glb.budget_version_id as string)," ", cast(glc.segment1 as string)) as balid
from oracle_financial.gl_balances glb,
oracle_financial.gl_code_combinations glc,
oracle_financial.gl_ledgers glg ;
If I add a null to a value, null will be returned.
I tried NVL it is not working.
Thanks,
Roshan
Created 07-13-2021 12:09 AM
On Oracle below works
select
concat(nvl(cast(glb.budget_version_id as varchar2(10)),0), cast(glc.segment1 as varchar2(10))) as balid
from gl.gl_balances glb,
gl.gl_code_combinations glc,
gl.gl_ledgers glg ;
Impala
Created 07-13-2021 12:09 AM
On Oracle below works
select
concat(nvl(cast(glb.budget_version_id as varchar2(10)),0), cast(glc.segment1 as varchar2(10))) as balid
from gl.gl_balances glb,
gl.gl_code_combinations glc,
gl.gl_ledgers glg ;
Impala
Created 07-14-2021 05:52 AM
@roshanbi Is your issue resolved?
If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future.
if (helpful) { mark_as_solution(); } | if (appreciated) { give_kudos(); }