|
|
#1 |
|
Участник
|
exist method on temporary table
Hi,
I'm trying to make exist method on temporary table something like this... Код: static boolean exist(MyTempTable _tempTable,
RefTableId _tableId,
RefRecId _recId)
{
return _tableid && _recId && (select RecId from _tempTable
where _tempTable.TableNum = _tableId
&& _tempTable.RecordNo = _recId
).RecId != 0;
}Any ideas what's the problem? |
|
|
|
|
#2 |
|
----------------
|
X++: static boolean exist(MyTempTable _tempTable, RefTableId _tableId, RefRecId _recId) { if(! _tableid || !_recId) return false; select RecId from _tempTable where _tempTable.TableNum = _tableId && _tempTable.RecordNo = _recId return _tempTable.RecId != 0; } |
|
|
|
| За это сообщение автора поблагодарили: ist (1). | |
|
|
#3 |
|
Участник
|
tks.
|
|
|
|
|
#4 |
|
Axapta
|
Just to make it clear for you. See the "Select statement" article in the Dev Guide:
Цитата:
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. 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. |
|
|