× 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.





I have written a Mass Change Function for my application using SQL, the users 
specifies parameters and the program updates the master and transaction files, 
by building up SQL Update statements , It has facilities to change keys on a 
master file. I am looking for a way to 1) Stop it failing when the
update, causes a duplicate key.  2) Delete the records to be updated that 
result in a duplicate.

E.g.    Rcd 1   Key 1 = A   Key 2 = B   Key 3=C  Key 4=X
       Rcd 2   Key 2 = A   Key 2 = B   key 3=D  Key 4=X
       Rcd 3   Key 2 = A   Key 2 = B   key 3=C  Key 4=Y

User has requested to change Key3 from c to d. for All records with key 1=A, 
2=B and 3=C This will result in a duplicate rcd and the update will fail, I 
would like to delete rcd 1 if it results in a duplicate.


+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.