Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
How to replace text values in a column by other text values? and i want to do it in the load script
Example:
1. How to replace in the column DATA1 the fields Dessine by Dessiné ?
2. How to replace in the column DATA 2 the fields .5 by windows7 ?
Supposed that i load the Data like this:
LOAD [DATA 1],
[DATA 2]
FROM
C:\Users\mydata\Desktop\sample_data.xlsx
(ooxml, embedded labels, table is Feuil1);
what should i do to transform my data ?
Thanx
Regards
Ali
Hi,
Try using the Applymap function.
Regards,
Kaushik Solanki
Thanx i will tell u if it works
Also, look here:
Either you can introduce any new table with Joins, Concatenation or Mapping with the help of one of this you can get change the text values in the existing values.
Hi,
may be you can create inline table.
Ex:
[Inline 1]:
Load * Inline
[
DATA 1,Data 1
Dessine,Dessiné
];
[INLINE TABLE2]:
Load * Inline
[
DATA 2,Data 2
.5,windows7
];
And use Data 1 instead of DATA 1 and Data 2 instead of DATA 2.
Try,
Replace your column field with the below condition and give the column alias:
If([Data 1] = 'Dessine', 'Dessiné', [Data 1]) as Column_Alias
If([Data 2] = .5, 'Windows7', [Data 2]) as Column_Alias