Book a Demo

Author Topic: SQL Server mixed ascending/descending index  (Read 2666 times)

Magnus Neck

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
SQL Server mixed ascending/descending index
« on: July 21, 2008, 10:00:39 pm »
I have a SQL Server table with an index containing 2 columns, with one of the columns sorted ascending and the other descending, created using this SQL Statement:

CREATE INDEX ix1 on tab1 (column1 DESC, column2 ASC)

I can't find a way to model this table and index in the Data Model of EA 7.1. The only way to set descending on an index seems to be using the Extended Properties on the index operation, which means that all of the columns in the index will be descending.

Is there any other way to model this in EA, or modify the DDL code generation to handle it?

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: SQL Server mixed ascending/descending index
« Reply #1 on: July 21, 2008, 10:18:38 pm »
I'm really not sure...

Perhaps you could handle this the same way you would create a trigger. That is, set up an operation on the table with the «index» stereotype - this is offered by the drop-down - and enter the details in the Initial Code box.

David

[edit]I just checked and the above suggestion does not work. Nor can I (easily) find anything in the EA documentation.

I suggest you send an immediate email to Sparx support to ask if this is possible at all. Remember to give the world time to revolve, since they are out of town.

If nobody sheds light on this problem first, please post back to let us know what Sparx suggests.[/edit]
No, you can't have it!