R
Rob Thompson
Hello all,
I'm using MS Access and I need to formulate an SQL statement to query
the MAX alpha character in a text field.
I've tried:
SELECT * FROM tblTable WHERE DwgRev = _
(SELECT MAX(DWGREV))
also
SELECT * FROM tblTable WHERE DwgRev = _
(SELECT CHAR(MAX(ASCII(DWGREV))))
neither will work
Any ideas?
Thanks,
Rob
Example of table:
Given:
Table with 3 fields: (all field types are "text")
DwgNo DwgRev DwgTitle
12345 - Widget #1
12345 A Widget #1
12345 B Widget #1
12345 C Widget #1
23456 - Widget #2
23456 A Widget #2
34567 - Widget #3
Needed:
An SQL query that will return: The latest revision of each drawing.
Where "-" is the initial revision and A, B, C... are subsequent
revisions.
DwgNo DwgRev DwgTitle
12345 C Widget #1
23456 A Widget #2
34567 - Widget #3
I'm using MS Access and I need to formulate an SQL statement to query
the MAX alpha character in a text field.
I've tried:
SELECT * FROM tblTable WHERE DwgRev = _
(SELECT MAX(DWGREV))
also
SELECT * FROM tblTable WHERE DwgRev = _
(SELECT CHAR(MAX(ASCII(DWGREV))))
neither will work
Any ideas?
Thanks,
Rob
Example of table:
Given:
Table with 3 fields: (all field types are "text")
DwgNo DwgRev DwgTitle
12345 - Widget #1
12345 A Widget #1
12345 B Widget #1
12345 C Widget #1
23456 - Widget #2
23456 A Widget #2
34567 - Widget #3
Needed:
An SQL query that will return: The latest revision of each drawing.
Where "-" is the initial revision and A, B, C... are subsequent
revisions.
DwgNo DwgRev DwgTitle
12345 C Widget #1
23456 A Widget #2
34567 - Widget #3