February 10, 2012, 08:21 AM
ChristianP [SOLVED] concatenating Tables
Hi,
in my fex i have 3 alpha files and i want to bring them together in one table. The first two files have only one value, and i want to place them on the first two places as constants. The third alpha has the main data.
Alpha1 Aplha2 Alpha3
Q42010/11 100100 1. TRANSPORTKOSTEN INBOUND 111.000
Q42010/11 100100 1.1. SCHIENE 0
Q42010/11 100100 1.2. STRASSE 0
Q42010/11 100100 1.2.1. LKW - Nahverkehr 0
Q42010/11 100100 1.2.2. LKW - Fernverkehr 0
Q42010/11 100100 1.2.2.1. LKW - Fernverkehr National 0
Regards
Christian
This message has been edited. Last edited by: ChristianP , February 14, 2012 02:00 AM February 10, 2012, 10:48 AM
njsden So you're not really "concatenating" tables.
What you need is to JOIN them *if* there is any value in ALPHA3 you can use to join to ALPHA1 and ALPHA2.
If you don't have such a value, you could make it up using a DEFINE-based JOIN.
A perhaps simpler approach would be to -READ each value from ALPHA1 and ALPHA2 into a couple of &variables.
Then, DEFINE 2 fields in ALPHA3 giving each the value of each &variable you read above.
Now you'll have everything there.
-READ ALPHA1 &ALPHA1_VAL.A9.
-READ ALPHA2 &ALPHA2_VAL.A6.
DEFINE FILE ALPHA3
ALPHA1_KEY/A9 = '&ALPHA1_VAL'; <=== 'Q42010/11'
ALPHA2_KEY/A6 = '&ALPHA2_VAL'; <=== '100100'
END
TABLE FILE ALPHA3
PRINT ALPHA1_KEY
ALPHA2_KEY
ALPHA3.FIELD1
ALPHA3.FIELD2
...
END
quote:
The first two files have only one value
That approach I suggested should work based on your statement above, which I interpret as: ALPHA1 and ALPHA2 have *1* record/line each.
Hope that helps.
February 13, 2012, 03:24 AM
ChristianP Hi njsden,
perfect!!!!! The problem with webfocus is that nearly everything is possible and our internal costumer knows that!!!
Regards
Christian
February 13, 2012, 10:07 AM
njsden Glad it helped! I like customers like that ... challenging yet reasonable (I hope the latter applies to yours
).
Would you please prefix your original post's title with [SOLVED]?
This message has been edited. Last edited by: njsden , February 15, 2012 10:46 AM