Discussions
Categories
Groups
Help
Home
User Community
Discussions
How to get a table's all variables without knowing their names?
unknown
get table variable("name") has to have a quoted name;
Accepted answers
All comments
mattf
Hi:
From this example from the help files, one can get the list of column names, or variables:
One can then iterate over the list and process each column in turn.
unknown
what I meant is for dt<
unknown
JSL users, anybody else can give some inputs? thanks.
wjlevin
I'd do a dt << get script () and then walk through the resulting string to identify the area of the message that involves variables. You'll need to use N Arg () and Arg () to do the walking.
Good luck!
Wayne
unknown
thanks. I just made it with the following lines.
<----
dt=Current Data Table();
dt<allscripts=dt<vnamelist={};
for(i=1,i<=narg(allscripts),i++,
if(
left(char(arg(allscripts,i)),18," ")=="New Table Variable",
vname=item(2,char(arg(allscripts,i)),"\!"");
insertinto(vnamelist,vname);
);
);
---->
mattf
--- Nice
Quick Links
All Categories
Recent Posts
Activity
Unanswered
Groups
Help
Best Of