![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello, I am trying to help get a query to work in Access 2003. There is one table, Engineering Document Register. In it are various columns, but only three are needed for this query. Doc No (Document Number) XMTL Ref (Transmittal reference number) and Issued. The database will have the same Doc No used several times, and the XMTL Ref number is used for more than one document. But each document will only be listed in XMTL Ref only once. Issued is the date that the XMTL Ref went out, so the date is not unique. What I need to do is make a query that will pull the latest date that the document was transmitted. Can this be done? Thanks, Rodjk #613 |
#3
| |||
| |||
|
|
Rodjk #613 wrote: Hello, I am trying to help get a query to work in Access 2003. There is one table, Engineering Document Register. In it are various columns, but only three are needed for this query. Doc No (Document Number) XMTL Ref (Transmittal reference number) and Issued. The database will have the same Doc No used several times, and the XMTL Ref number is used for more than one document. But each document will only be listed in XMTL Ref only once. Issued is the date that the XMTL Ref went out, so the date is not unique. What I need to do is make a query that will pull the latest date that the document was transmitted. Can this be done? Thanks, Rodjk #613 Query/Design/New, add table Engineering Document Register, then press Close. Drag down from table to a column the field DocNumber. *Drag Issued to another column. *Click from the menu View/Totals. *Under Issued column select Max. *Run the query. |
#4
| |||
| |||
|
|
Hello, I am trying to help get a query to work in Access 2003. There is one table, Engineering Document Register. In it are various columns, but only three are needed for this query. Doc No (Document Number) XMTL Ref (Transmittal reference number) and Issued. The database will have the same Doc No used several times, and the XMTL Ref number is used for more than one document. But each document will only be listed in XMTL Ref only once. Issued is the date that the XMTL Ref went out, so the date is not unique. What I need to do is make a query that will pull the latest date that the document was transmitted. Can this be done? Thanks, Rodjk #613 |
#5
| |||
| |||
|
|
On Jan 11, 6:53*pm, "Rodjk #613" <rjka... (AT) gmail (DOT) com> wrote: Hello, I am trying to help get a query to work in Access 2003. There is one table, Engineering Document Register. In it are various columns, but only three are needed for this query. Doc No (Document Number) XMTL Ref (Transmittal reference number) and Issued. The database will have the same Doc No used several times, and the XMTL Ref number is used for more than one document. But each document will only be listed in XMTL Ref only once. Issued is the date that the XMTL Ref went out, so the date is not unique. What I need to do is make a query that will pull the latest date that the document was transmitted. Can this be done? Thanks, Rodjk #613 So any one combination of XMLT and DocNo will be unique, but that's irrelevant because all you really want is the latest IssuedDate for a DocNo. SELECT dr.DocNo, dr.XMTLRef, dr.DateIssued FROM DocRegister AS dr WHERE dr.DateIssued In (SELECT Max(DateIssued) From DocRegister WHERE DocNo = dr.DocNo) AND dr.DocNo = ? |
![]() |
| Thread Tools | |
| Display Modes | |
| |