Mar 15, 2016 #1 2009luca Programmer Jul 27, 2013 222 IT I have in a atable: FIELD1 FIELD2 AAAA 01/01/2016 AAAA 13/03/2016 BBBB 01/03/2016 ... I need with, a sql, to exctract a unique records in field1 based the max date in field2... result for me: AAAA 13/03/2016 BBBB 01/03/2016 note: i use ADO and vb6
I have in a atable: FIELD1 FIELD2 AAAA 01/01/2016 AAAA 13/03/2016 BBBB 01/03/2016 ... I need with, a sql, to exctract a unique records in field1 based the max date in field2... result for me: AAAA 13/03/2016 BBBB 01/03/2016 note: i use ADO and vb6
Mar 15, 2016 #2 Andrzejek Programmer Jan 10, 2006 8,502 US Select FIELD1, MAX(FIELD2) As FIELD2 From atable Group By FIELD1 Have fun. ---- Andy A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station. Upvote 0 Downvote
Select FIELD1, MAX(FIELD2) As FIELD2 From atable Group By FIELD1 Have fun. ---- Andy A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station.