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



Yes that is correct; I would PREFER to remove the UNIQUE attribute, while leaving the field intact as a key.

If that were not possible, then I would accept dropping the field and re-adding the field as a non-unique key.

Goal:

I am running a TEST pgm which outputs to a file, and also running [almost the same version with a few small changes] PROD pgm.

I want to run CMPPFM but the key field (which is an incrementing seq#) is one-off at times.

I thought an easy solution would be to clear that seq# prior to CMPPFM, but the UNIQUE constraint wont allow that.

If I can SQL ALTER the field to remove the UNIQUE constraint, then set all keys to zero, then I could compare the TEST vs PROD versions of the file using CMPPFM.



-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Vern Hamberg
Sent: Thursday, May 02, 2013 12:35 PM
To: Midrange Systems Technical Discussion
Subject: Re: SQL Alter table: can I remove the UNIQUE attribute from a key?

Didn't he ask how to remove just the UNIQUE attribute?

----- Original Message -----
Chuck,

He asked how to remove the key. I showed him how to do it.

I assumed he could figure it out how to add the key back by rerunning the
...ADD PRIMARY KEY... But after seeing his reply where he blew off the
detailed steps I'm not so sure.


Rob Berendt

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.