MTBF Analysis in Access query

Some videos you may like

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

xenou

MrExcel MVP, Moderator
Joined
Mar 2, 2007
Messages
16,649
Office Version
2013
Platform
Windows
Remove the second word "from". Then try again. If it doesn't work post back but do try to fix the syntax errors yourself so you don't have to wait for me.
 

Tcurtis

Board Regular
Joined
Aug 15, 2009
Messages
144
With a little modification this is working. I am having issues when there are more than two lines for each barcode and I think that I have some data that is incorrect. Here is the sql I am using now.
I think I will need to do some scrubbing before determining the MTBF. I really appreciate the help with this.

SELECT DISTINCT t1.BarCode, DateDiff("d",[t1].[Date_Warranty],[t2].[Date_Ent]) AS DateDifference
FROM tbl_MTBF_Multiple_Entries AS t1 INNER JOIN tbl_MTBF_Multiple_Entries AS t2 ON t1.BarCode = t2.BarCode
WHERE (((t1.RA_Num)<>[t2].[RA_Num]) AND ((t2.Date_Ent)>=[t1].[Date_Warranty]));
 

Watch MrExcel Video

Forum statistics

Threads
1,100,095
Messages
5,472,451
Members
406,816
Latest member
SUBHAS1812

This Week's Hot Topics

Top