I know I am close, but not quite

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jaad
    New Member
    • Oct 2009
    • 158

    I know I am close, but not quite

    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.

    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]);
  • jaad
    New Member
    • Oct 2009
    • 158

    #2
    Never mind Guys, I figured it out. It was my joins that were causing the problem.

    One thing I can start seeing though... Since I been coming over this forum I've learned a lot and starting to see things in a whole new light, cheers

    Comment

    Working...