|
I have been beating my head on the wall this afternoon, need more brains.I tried this SQLs (STRSQL) and it worked:
Here is the list I need from the sample data shown below (order doesn't
matter, don't need the items without the dash). i.e., I need a distinct
list of the highest revision number for each item.
ITEM01-RV04
ITEM02-RV04
ITEM03-RV06
SQL to create sample data:
CREATE TABLE
qtemp/temp
(ITM NUMERIC (8 , 0) NOT NULL WITH DEFAULT,
LITM CHAR (25 ) NOT NULL WITH DEFAULT);
Insert into
qtemp/temp (ITM , LITM)
Values
(1 ,'ITEM01 ')
, (2 ,'ITEM01-RV01')
, (3 ,'ITEM01-RV02')
, (5 ,'ITEM01-RV03')
, (6 ,'ITEM01-RV04')
, (7 ,'ITEM02 ')
, (8 ,'ITEM02-RV02')
, (9 ,'ITEM02-RV03')
, (10,'ITEM02-RV04')
, (11,'ITEM03 ')
, (12,'ITEM03-RV05')
, (13,'ITEM03-RV06')
, (14,'ITEM04');
Regards,
Stumped in Austin
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.