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



Good question!

I'm not sure what all of the consequences are, but one I know about is that
when there is no primary constraint, you can insert a NULL value in a
NULL-capable field, even if it has a UNIQUE constraint. Reverse is not true
(i.e. for non-QTEMP with a PK on it).
Another restriction ought to be that you can't have a foreign key constraint
to the QTEMP file.
Another question may be, does it impact query optimizer's decision making in
any way. That one is very tough to answer as QO is a complicated beast.

Elvis

Celebrating 11-Years of SQL Performance Excellence on IBM i, i5/OS and
OS/400
www.centerfieldtechnology.com


-----Original Message-----
Subject: Constraint cannot be added to file in library QTEMP

Hi Folks,

I have a table in a library (non-QTEMP) with a Primary Key Constraint that I
use CRTDUPOBJ to QTEMP with.

This results with the following:

CPD32B0 - Constraint is not valid.


CPF32B0 - Constraint cannot be added to file in library QTEMP.

I've looked through the archives and there were several posts about this so
it appears that everyone knows you can't have constraints added to a table
in QTEMP.

I'm just wondering what effect, if any, there is since the key is still
unique:

A DSPFD on the table in QTEMP shows UNIQUE=Yes, Constraint Type=None

A DSPFD on the table in the other library shows UNIQUE=Yes, Constraint
Type=Primary



I guess I'm asking what the constraint does for the non-QTEMP file that
won't be done for the file in QTEMP.

Tks.

Glenn Gundermann




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.