So far i've used a lot of mappings to bring fields from one table to another. At the beginning I only needed to copy one or two fields, but i need more. OJO: all my tables are qualify.
I think the best way is using join, the left one in my case. Isn't it?
Explaining myself: I've a table X with a client_code. The clients have master table (obviously) named CLIENT and another 2 ones with them type (CLIENT_TYPE) and channel (CLIENT_CHANNEL).
So, I need the name of the type and channel in the X table. I know u could recommend me to link the tables (i've done already) but this X table i need it separated of the rest of the model.
As I told you before, i'm using mappings, but I'm desperated for another solution 'cause I've too many mappings in all my 25 tables.
So, I've tried with JOIN, and I'm not use at all to use them, I'm kind of confuse, Let me show you:
//////////////////////// CHANNEL CLIENT CHANNEL_CLIENT: QUALIFY *; UNQUALIFY CO_CHANNEL; Load CO_CHANEL AS CO_CHANNEL, NA_CHANEL FROM QvD\CHANNEL_CLIENT.QVD (qvd);
//******************* PARA LA GESTION DE LA FACTURACIÓN ********************// X: QUALIFY *; UNQUALIFY TT_Mes_Emis, TT_Anno_Emis, T_Quarter, T_VEN_DES, T_CLIENT_NAME, T_CO_CATEGORIA, T_CO_LINE_PRODUCT, T_PRODUCT_NAME, T_CO_CHANNEL, T_TYPE, CO_ENTERPRISE, CO_CHANNEL; Load VRENG_FAC.fact_num, VRENG_FAC.CO_PRO_AUX, CO_PRODUCT, // APPLYMAP('VPROD_NAME_MAP',CO_PRODUCT,) AS T_PRODUCT_NAME, // APPLYMAP('VPROD_CAT_MAP', CO_PRODUCT) AS T_CO_CATEGORIA, // APPLYMAP('VPROD_LIN_MAP', CO_PRODUCT) AS T_CO_LINE_PRODUCT,
VRENG_FAC.CO_CLIENT, VRENG_FAC.CLIENT_NAME AS T_CLIENT_NAME, APPLYMAP('VCLI_CHAN_MAP',VRENG_FAC.CO_CLIENT) AS CO_CHANNEL // APPLYMAP('VCLI_TYPE_MAP', VRENG_FAC.CO_CLIENT) AS T_TYPE, // APPLYMAP('VCLI_EXCSALE_MAP',VRENG_FAC.CO_CLIENT) AS EXCLUDED_SALES
LEFT JOIN (X) LOAD CHANNEL_CLIENT.NA_CHANEL RESIDENT CHANNEL_CLIENT; ??????????????????????????????????
Ok, so.. I want join the NA_CHANNEL FROM CHANNEL_CLIENT TO X.
The link, it suposse to be the CO_CHANNEL, right??? but it's qualify in X table (& I need it that way because i dont want this table be connected to the rest of my model)