× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




Morning all
I have a file that is keyed, but I have multiple records with the same key
that I need to delete but keep the latest record
Fortunately there is a create "date" on the file (really a 6 digit numeric
field in mmddyy format)

here is my sql statement

Delete From FILE1 A
Where RRN(A) in
(Select RRN(B),
b.* From FILE1b, FILE1 C
Where B.ord# = C.ord# and
substr(digits(b.crtdat), 5, 2) || substr(digits(b.crtdat), 1, 4) <
substr(digits(c.crtdat), 5, 2) || substr(digits(c.crtdat), 1, 4))


Unfortunately I am receiving the following message
Subselect with more than one result column not valid.

I checked and confirmed that for the same Ord#, there are more than 2
records (5 or 6 in some cases)

Ord# is the only field that is the key. The other fields on the record have
no bearing between the duplicate ord# (Hopefully that last sentence makes
sense)

Anyone have any ideas how I can circumvent this problem
Alan Shore
Programmer/Analyst, Direct Response
E:AShore@xxxxxxxx
P:(631) 200-5019
C:(631) 880-8640
"If you're going through Hell, keep going" - Winston Churchill

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.