i=select maxof(Rno1) from tempcol;

while assigning like this am getting error…

int i;


i=select maxof(Rno1) from tempcol;

Rno also int type,

wat s the pblm, pls anyone help me…


select maxof(Rno1) from tempcol returns a table buffer and that’s not compatible with the int type. You have to specify a field, e.g. i = (select maxof(Rno1) from tempcol).Rno1;


how can u assign select statement to a variable., this is syntax error …

select statement never returns a value directly…thru table name you can get a value…

you can modify ur code like this…

i=(select maxof(Rno1) from Tempcol).Rno1; → Tempcol is a table name not a buffer name…

hi Martin,

i tried as per ur example, now also am getting error

the tempcol does not exist

wat s the pblm


The select uses the table name, but I don’t know the type of “tempcol”, you’re the only one who knows it.

Anyway, look at this example using standard AX objects:

int level = (select maxOf(InventLocationLevel) from InventLocation).InventLocationLevel;