--- In Axapta-Knowledge-Village@yahoogroups.com, "dgreatone123"
<dgreatone...@...> wrote:
>
> Hi,
> 
> sELECT count(recid) FROM EmplTable;
> 
> I want to execute the above statement
> 
> but the table will be variable, I will 
> supply the table name. How can It be done?
> 
> something like this.
> 
> selec count(recid) from tname;
> 
> where tname='EmplTable";
> 
> Any help will be greatly appreciated.
> 
> regards,






hI
> D' great
USE THE EDT TABLENAME FOR HAVING ALL TABLENAME LOOKUP
THEN USE A VARIABLE TO STORE SELECTED TABLE NAME

THEN DO AS FOLLOWS


 common common;;
DICTTABLE DT;
;
dt=new dicttable(tablename2id(SELECTEDTABLENAME STORED IN VARIABLE));
common=dt.makeRecord();
sELECT count(recid) FROM COMMON;

AND IT WILL WORK 100%

REGARDS;

Reply via email to