Показать сообщение отдельно
Старый 25.04.2009, 00:04   #2  
ZVV is offline
ZVV
MCITP
MCP
Oracle
MCBMSS
 
1,006 / 246 (11) ++++++
Регистрация: 13.02.2004
Адрес: Минск
->
Цитата:
Сообщение от Hugon Посмотреть сообщение
Hi All
I have table axtable_1 with some information:

descrition | periodFromDate | periodToDate

and I have field EmplTable.field1 on each employee

empl01 | field1
empl02 | field2 ...

During running EmplTable I need system check axtable_1 and if system date belong to this period, system should put description to EmplTable.field1

Could you help me with this?

Thank you in advance
Hugon

If I've correctly understood your question you just need put some code in update() method of EmplTable.
Smth. like this:
X++:
if (<smth>)
{
   select firstOnly axtable_1
      where axtable_1.periodFromDate <= this.<smth>
           && axtable_1.periodToDate >= this.<smth>;

   if (axtable_1)
      this.field1 := axtable_1.description;
}
...
super();
Final version of code (with checks and so on) could you write yourself, I'm sure..
__________________
Zhirenkov Vitaly