Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- SIx Driver RDD v3.00 - Reference Guide - <b>sx_skipunique():</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Sx_SkipUnique():

  Syntax:  Sx_SkipUnique( [nSkipVal] )

           nSkipVal = Optional numeric value indicating the direction to be
                      skipped.  The default value is 1, and will skip ahead
                      to the next greater key value.  A value of -1 would
                      skip to the first key of lesser value in the order.

  Returns:  NIL

  Description:  Sx_SkipUnique() allows you to SKIP through a non-UNIQUE
                index order as if it had been created with the UNIQUE clause.
                This eliminates the need to have a full index and a UNIQUE
                index built on the same expression.  For those cases, you
                can now use one index to handle both situations.

  Example:

    #include "SIXNSX.CH"

    CLS
    USE test EXCL VIA "SIXNSX"
    INDEX ON state TO state

    // Display STATE field for ALL records (and index keys)
    WAIT "Press any key to see all STATE values in index..."
    GO TOP
    DO WHILE !eof()
      ? test->STATE
      dbSkip()
    ENDDO
    ?

    // Display STATE field for first records (and index key) of UNIQUE value
    WAIT "Press any key to see only one of each STATE value in the index..."
    GO TOP
    DO WHILE !eof()
      ? test->STATE
      Sx_SkipUnique()
    ENDDO


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