Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have 2 tables that are no linked
QV_TOU_CONTACT
CONTACT_NUM
TEL_1 (format exemple 06020202)
TEL_2
QV_TIKAL
DATE
TEL_TIKAL_1 (format exemple 3306020202)
TEL_TIKAL_2
USER
I have done the graphic bellow, from the table QV_TIKAl :
DATE USER TEL_TIKAL_1 TEL_TIKAL_2
I want to add the column CONTACT_NUM from CONTACT_NUM when
TEL_TIKAL_1=TEL_1 or =TEL_2
or
TEL_TIKAL_2=TEL_1 or =TEL_2
How can I do this ?
Thanks
In this case we use the FieldIndex of one field to get a value of a second field. The FieldIndex is defined by load order (see manual), so this only works if the indices of both fields always are 'synchronized' e.g. each new unique value loaded for one field should also have a unique value loaded for the other field.
Like said, it is better to link the tables. You could also use a mapping load, advantage is that the original value will be kept if there is no matching value, meaning you can apply several maps to one field. I've made a small start example, it's not finished and I have no more time to work on this, sorry. You probably still have to make sure that you have a field you will map that ALWAYS has '33' to start with
Map_TEL_PORTABLE:
Mapping Load
TEL_PORTABLE,
CONTACT_NUM
resident QV_TOU_CONTACTS_VENTES;
Map_TEL_DOMICILE:
Mapping Load
TEL_DOMICILE,
CONTACT_NUM
resident QV_TOU_CONTACTS_VENTES;
Load
TIKAL_DESTINATAIRE,
Applymap(TIKAL_DESTINATAIRE,Map_TEL_PORTABLE) as CONTACT_NUM1,
Applymap(TIKAL_DESTINATAIRE,Map_TEL_DOMICILE) as CONTACT_NUM2
Resident QV_TIKAL_CALL;
Thanks a lot
As far as I have been able to help you , but you're welcome...