Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
I have a hierarchy of some groups with subgroups, but there exists some groups which don't contains an information in every hierarchy level. I need the field ATLG_Kode.
Sure, i can use some nested if-clauses
if(not isnull(ATLG_Ebene6Kode),ATLG_Ebene6Kode,
if(not isnull(ATLG_Ebene5Kode),ATLG_Ebene5Kode,
if(not isnull(ATLG_Ebene4Kode),ATLG_Ebene4Kode,
if(not isnull(ATLG_Ebene3Kode),ATLG_Ebene3Kode,
if(not isnull(ATLG_Ebene2Kode),ATLG_Ebene2Kode,
ATLG_Ebene1Kode))))) AS ATLG_Kode,
But does not exists a smarter way to do this???
May be this
Alt(ATLG_Ebene6Kode, ATLG_Ebene5Kode, ATLG_Ebene4Kode, ATLG_Ebene3Kode, ATLG_Ebene2Kode, ATLG_Ebene1Kode) AS ATLG_Kode,