KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Indexes must use a unique name when created via SQL
PRODUCT: 4D | VERSION: 12.5 | PLATFORM: Mac & Win
Published On: June 12, 2014

When using SQL within 4D to create an index, the name of the index must be unique. Using the name of index that already exists will produce errors 1809 and 1155; 'Failed to execute CREATE INDEX command.'

One approach is to append the table name to the index name so if you are creating an index for the Primary Key of Table1 using field named pk (i.e. [Table1]pk) you could, for example, name the index Table1pk like this:

Begin SQL
    CREATE INDEX Table1pk ON Table1 (pk)
End SQL