L
Laynester
Hello Access 2007 Google Groupmeisters, need your help and support on
this one....
My Table:
Field1 Field2 Field3 Field4
MPIID MPIID 07499750
MEDREC 06 000014180210
MEDREC OHMC 679558
MEDREC OHSC 0385633
MEDREC OSO OSO-679558
MPIID MPIID 08931110
MEDREC OSO OSO-1203758
The Select Stmt:
SELECT Table1.Field2, Min(Table1.Field3) AS MinOfField3
FROM Table1
WHERE Table1.Field2 <> 'MPIID'
GROUP BY Table1.Field2;
The result of the stmt above:
Field2 MinOfField3
06 000014180210
OHMC 679558
OHSC 0385633
OSO OSO-1203758
The issue:
If you look at the last value returned:
'OSO-1203758' it's GREATER THAN 'OSO-679558'
I need the 'OSO-679558' value returned NOT the OSO-1203758' (higher)
value.
How can I do that? I need the min's on the other fields (as in my
select) yet this 'OSO-' makes the HIGHER value number being returned?
Thanks in advance - this has been a real sql 'twister' (for me
anyways) in getting the (lowest) OSO- value needed.
Laynester
this one....
My Table:
Field1 Field2 Field3 Field4
MPIID MPIID 07499750
MEDREC 06 000014180210
MEDREC OHMC 679558
MEDREC OHSC 0385633
MEDREC OSO OSO-679558
MPIID MPIID 08931110
MEDREC OSO OSO-1203758
The Select Stmt:
SELECT Table1.Field2, Min(Table1.Field3) AS MinOfField3
FROM Table1
WHERE Table1.Field2 <> 'MPIID'
GROUP BY Table1.Field2;
The result of the stmt above:
Field2 MinOfField3
06 000014180210
OHMC 679558
OHSC 0385633
OSO OSO-1203758
The issue:
If you look at the last value returned:
'OSO-1203758' it's GREATER THAN 'OSO-679558'
I need the 'OSO-679558' value returned NOT the OSO-1203758' (higher)
value.
How can I do that? I need the min's on the other fields (as in my
select) yet this 'OSO-' makes the HIGHER value number being returned?
Thanks in advance - this has been a real sql 'twister' (for me
anyways) in getting the (lowest) OSO- value needed.
Laynester