Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone,
I have few tables in my data model which start with 'T_' .
I want to concatenate all the tables in my data model which have there names starting from 'T_'.
I tried the following code ,
F:
Load *
Resident [T_*];
But it's not working.
Please suggest if this can done or not. And if yes, then how.
Also don't suggest me to make a qvd of all and store them into a common folder and then extract them. As I have around 500 tables like that
Thanking you all in anticipation
Regards
Karunpreet
I think you will need to implement some kind of loop where you would use TableName() and TableNumber() function to concatenate all the tables starting with T into one table. I have never done this, but if nobody else provides a solution by the end of day today, I will try to get a sample together.
Best,
Sunny
Hi Karunpreet,
let vTabCnt = NoOfTables()-1;
for i=0 to vTabCnt
let vTabName = TableName($(i));
if left('$(vTabName)',2)='T_' then
if i=0 then
RENAME Table [$(vTabName)] to NEWTABLE;
else
Concatenate(NEWTABLE)
LOAD * Resident [$(vTabName)];
DROP Table [$(vTabName)];
end if
end if
next
regards
Christian
Thanks for the hint Sunny
Christian,
Thanks for such a genius reply