Hi have a string which stores the bufferTable name, now i want to use this string in a select statement,
Is there a way out?
thanks and appreciate any inputs
Hi have a string which stores the bufferTable name, now i want to use this string in a select statement,
Is there a way out?
thanks and appreciate any inputs
For example:
SysDictTable dictTable = SysDictTable::newName('UserInfo');
Common common = dictTable.makeRecord();
while select common
{
//This expects that the table contains "Name" field
info(common.(dictTable.fieldName2Id('Name')));
}
Hi,
Other alternative is constructing a SQL statement using the variable which has got the table name. For instance -
str 500 sqlStat;
str tableName = ‘CustTable’;
;
sqlStat = 'select * from ’ + tableName;
You can then use Connection class to execute this statement.