By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,335 Members | 2,281 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,335 IT Pros & Developers. It's quick & easy.

I know I am close, but not quite

P: 158
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.

Expand|Select|Wrap|Line Numbers
  1. SELECT InvCategoriesT.InvCatID, IIf(IsNull([InvCatTypeName]),IIf(IsNull([InvCatTypeItemName]),[InvCatName]),[invCatName] & ", " & [InvCatTypeName] & ", " & [InvCatTypeItemName]) AS Category
  2. 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
  3. ORDER BY IIf(IsNull([InvCatTypeName]),IIf(IsNull([InvCatTypeItemName]),[InvCatName]),[invCatName] & ", " & [InvCatTypeName] & ", " & [InvCatTypeItemName]);
Feb 10 '10 #1
Share this Question
Share on Google+
1 Reply

P: 158
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
Feb 10 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.