Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I'm not sure if this is a product limitation or bug.
i have a for loop to reload data for next database which will store qvd in another folder.within this for loop, i'm using a mapping table and applymap function.
When i use applymap, the value is not map as it supposed to be when i loop 2 databases. if i just use 1 db at a time, it's ok.
i can't drop a mapping table before the next command. is there a workaround for this? Doing a left join will be slow.
Any idea is very appreciated. Thanks!
Hi
Is the mapping load statement outside or within your for-loop?
If it's inside the loop I guess it could mean trouble since you will be creating the same table over and over again. Not sure really what the result of such on operation would be.
If this is your case, try adding a variable counter to the mapping table name.
Something like this maybe (untested):
set counter = 0;
for x = 0 to 10
set counter = counter + 1;
map$(counter):
mapping load ....
load applymap('map$(counter)', field, defaultvalue) as mapField ....
next
Hi
Is the mapping load statement outside or within your for-loop?
If it's inside the loop I guess it could mean trouble since you will be creating the same table over and over again. Not sure really what the result of such on operation would be.
If this is your case, try adding a variable counter to the mapping table name.
Something like this maybe (untested):
set counter = 0;
for x = 0 to 10
set counter = counter + 1;
map$(counter):
mapping load ....
load applymap('map$(counter)', field, defaultvalue) as mapField ....
next
thanks fredrik! it works!