AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
DAX
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 06.12.2010, 23:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
dynamicsaxtraining: Some issues during changing index uniqueness
Источник: http://www.dynamicsaxtraining.com/kn...dex-uniqueness
==============

Some times we need to create a new unique index or alter existing one, but table may already contain duplicate data for this index and our changes could not be applied until data in table fixed to support uniqueness. We could do it by deleting records in the table but due to huge number of companies in environment it could be time consuming. To save your time you could use following job:

static void Job3(Args _args){ MyTable myTable; DataArea da; int cnt; ; ttsbegin; while select da { cnt = 1; changecompany(da.Id) { myTable = null; while select forupdate myTable { cnt++; myTable.FieldForUniqueness = int2str( cnt ); myTable.update(); } } } ttscommit;}Another way to solve this problem is to make following steps:
  1. Try to synchronize your table
  2. You get an error saying that there are duplicates
  3. Rright away you go to Administration > Periodic > SQL Administration form.
  4. Select your table in the list and run Table actions > Check/Synchronize command.
  5. In appeared form enable “Check Allow duplicated’” and run.
  6. You will get a list of conflicting records to kill.

Источник: http://www.dynamicsaxtraining.com/kn...dex-uniqueness
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Скрипт для партицирования в Юконе нужен ? Torin DAX: База знаний и проекты 12 04.07.2012 14:05
Rajdip's space: The mystery of "index" vs. "index hint" Blog bot DAX Blogs 0 20.04.2010 20:05
dynamicsaxtraining: Create purchase order Blog bot DAX Blogs 0 14.12.2009 14:05
dynamicsaxtraining: Setup initial data (Vendor, Warehouse, Equipment) Blog bot DAX Blogs 0 07.12.2009 19:05
Fred Shen: Tips on optimizing primary index in Axapta Blog bot DAX Blogs 0 28.10.2006 16:40

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 16:01.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.