Results 1 to 3 of 3

Thread: UNIQUE Column Restraint: how to determine?

  1. #1
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,185

    UNIQUE Column Restraint: how to determine?

    I've found how to "read" all the column restraints except this one: UNIQUE

    I realize an index tag is created by that name as UNIQUE (and if an index already exists for that field it makes it UNIQUE -- I haven't checked what happens if the existing index has a different index expression).

    But that's a bit difficult to check in a large model for every field to find out if it's UNIQUE. Is there another way that I missed?

    thanks,

    Hank

  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,163
    Blog Entries
    22
    Hi Hank

    The only way to determine if a column is unique is open the table and check the indexes to see if there is an index tag and its unique.
    https://www.lianja.com/doc/index.php/TAGUNIQUE()

    or alternatively look at sysindexinfo.
    https://www.lianja.com/doc/index.php/SYSINDEXINFO
    Last edited by barrymavin; 2018-10-13 at 22:05.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  3. #3
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,185
    That makes sense: it's really about the index in any case.

    In the previous reality, I put a field in our DD table for fields to optionally pick an "Index" with several choices, one of which was Candidate. Of course this wasn't a field attribute at all, but just a quick way for the data designer to get an index on the field without having to switch the UI they were already in (in xCase).

    thanks,

    Hank

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us