Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide To Clipper - <b>set unique</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
SET UNIQUE


Syntax:     SET UNIQUE on/OFF/(<expL>)

Purpose:    To toggle the inclusion of non-unique keys when creating a
            new index.

Usage:      When you INDEX with UNIQUE ON, Clipper creates an index with
            uniqueness as an attribute.  As indexing proceeds and two or
            more records have the same key value, Clipper includes only
            the first record in the index.  Whenever the unique index is
            updated, REINDEXed, or PACKed, only unique records are
            added.  The index retains the uniqueness attribute without
            regard to the current UNIQUE SETting.

            Note that this differs from previous versions of Clipper
            where UNIQUE was a global SETting and applied to the
            creation and updating of all open indexes.

Library:    CLIPPER.LIB


----------------------------------- Examples -------------------------------

   The following example lists all Customers by State:

   SET UNIQUE OFF
   USE Customers
   INDEX ON State + Customer TO State

   LIST State, Customer


   This example lists all States where there are Customers:

   SET UNIQUE ON
   USE Customers
   INDEX ON State TO State

   LIST State


See Also: FIND INDEX REINDEX SEEK

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson