Показать сообщение отдельно
Старый 04.03.2008, 16:05   #6  
belugin is offline
belugin
Участник
Аватар для belugin
Сотрудники Microsoft Dynamics
Лучший по профессии 2017
Лучший по профессии 2015
Лучший по профессии 2014
Лучший по профессии 2011
Лучший по профессии 2009
 
4,622 / 2925 (107) +++++++++
Регистрация: 16.01.2004
Записей в блоге: 5
Field select
It is also possible to use a select statement in a lookup on a field. After a select statement that fetched a record in a table, you can write .field name to reference a field in the table.

Below you will find examples of this field select. Note, that these selects must be used in expressions!

X++:
void selectFieldExamples ()

{

// prints the NameRef field from the selected customer (which is CBS)

print (select Custtable order by NameRef).NameRef;

// Uses the balance field from the customer with accountNo 5000 (Pentagon).

// Prints a message.

if ((select Custtable where AccountNo == ).Balance > 500000)

print This customer has a balance above $500,;

}
Notice the difference between the normal select and the field select. The field select operates directly on a table, whereas the select statement operates on a table variable