locked
SQL Server Management Studio v 18.4 messing indexes. RRS feed

  • Question

  • While creating a table I added a filtered unique index on a field in order to only allow a single record with each value as I used to do in previous databases.

    But  when I add a foreign key that need both tables to be recreated it looses the filter.

    If the table is empty it just looses the filter and saves the changes, if it has data (only my test to check if the filter is working so far) it says the unique index prevents the changes from being saved ignoring the filter.

    So do I have to design the whole database and only add this kind of filtered indexes at the end, or am I missing something?

    Wednesday, November 13, 2019 3:08 PM

Answers

  • It seems that you are using the "design table" dialog or something like that, and that GUI produces incorrect SQL. I.e., has a bug in it. I suggest you report this to ms at Uservoice and se what they have to say about it...

    Tibor Karaszi, SQL Server MVP (Web Blog)

    Wednesday, November 13, 2019 5:47 PM
  • Hi P M M,

    We can submit the bug of SQL server to the Microsoft feedback at this link https://feedback.azure.com/forums/908035-sql-server . This site will serve as a connecting point between you and Microsoft, and ultimately the large community for you and Microsoft to interact with. Your feedback enables Microsoft to offer the best software and deliver superior services, meanwhile you can learn more about and contribute to the exciting projects on Microsoft feedback.

    Best regards,
    Cathy

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to  MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Thursday, November 14, 2019 2:40 AM

All replies

  • It seems that you are using the "design table" dialog or something like that, and that GUI produces incorrect SQL. I.e., has a bug in it. I suggest you report this to ms at Uservoice and se what they have to say about it...

    Tibor Karaszi, SQL Server MVP (Web Blog)

    Wednesday, November 13, 2019 5:47 PM
  • Hi P M M,

    We can submit the bug of SQL server to the Microsoft feedback at this link https://feedback.azure.com/forums/908035-sql-server . This site will serve as a connecting point between you and Microsoft, and ultimately the large community for you and Microsoft to interact with. Your feedback enables Microsoft to offer the best software and deliver superior services, meanwhile you can learn more about and contribute to the exciting projects on Microsoft feedback.

    Best regards,
    Cathy

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to  MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Thursday, November 14, 2019 2:40 AM