on 11-24-2007 5:57 PM
Hello,
How does foreach work?
IF i have 2 cubes, and I have this Foreach:
Foreach A,B,CubeA.
B2 = concat(B1,Z)
{KF,A1,B1,CubeA} = {KF,A1,B2, CubeB}
EndFor.
Will the Foreach which specifies only CubeA be able to read & assign value from CubeB?
Can I change the value of B2 like above? What happens if the changed B2 happen to be not found in CubeB?
What will be copied if CubeB does not have the record specified in {KF,A1,B2, CubeB} ? Will anything be copied to CubeA?
regards
Sanjay
Hi Sanjay,
FOREACH reads all the possible combinations from the (planning package) of the chars selected in the FOREACH statement (A,B,CubeA in your case).
Considering that answer to your questions: -
Will the Foreach which specifies only CubeA be able to read & assign value from CubeB?
- -Not sure why do you want to keep Cube A in the FOREACH statement but if that is there then you can not read from cube B.
Can I change the value of B2 like above? What happens if the changed B2 happen to be not found in Cube B?
- I do not think you have concat function in FOX. But in case if its there you should be able to get the value of B2 (Z is some number I guess?). If B2 is not there in the cube nothing will be read.
What will be copied if CubeB does not have the record specified in {KF,A1,B2, CubeB} ? Will anything be copied to CubeA?
- Nothing gets copied over in this case.
Hope this helps.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.