Hey Guys, Me again...
There is something missing in here that doesn't make it work quite fully work. I am trying to get three different levels of categories concatenating together but I still haven't got it right. The first value[InvCatName] is never Null, but the other two may be Null. How do I phrase the code so I can see the result correctly? thanks.
There is something missing in here that doesn't make it work quite fully work. I am trying to get three different levels of categories concatenating together but I still haven't got it right. The first value[InvCatName] is never Null, but the other two may be Null. How do I phrase the code so I can see the result correctly? thanks.
Code:
SELECT InvCategoriesT.InvCatID, IIf(IsNull([InvCatTypeName]),IIf(IsNull([InvCatTypeItemName]),[InvCatName]),[invCatName] & ", " & [InvCatTypeName] & ", " & [InvCatTypeItemName]) AS Category FROM InvCatTypeItemNameT INNER JOIN (InvCatTypesNameT INNER JOIN (InvCatNameT INNER JOIN InvCategoriesT ON InvCatNameT.InvCatNameID = InvCategoriesT.InvCatNameID) ON InvCatTypesNameT.InvCatTypeNameID = InvCategoriesT.InvCatTypeNameID) ON InvCatTypeItemNameT.InvCatTypeItemID = InvCategoriesT.InvCatTypeItemNameID ORDER BY IIf(IsNull([InvCatTypeName]),IIf(IsNull([InvCatTypeItemName]),[InvCatName]),[invCatName] & ", " & [InvCatTypeName] & ", " & [InvCatTypeItemName]);
Comment